Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
/composer.lock
/phpcs.xml
/phpunit.xml
/tests/tmp
/var
/vendor
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
"description": "Symfony MakerBundle for MongoDB ODM",
"keywords": ["mongodb", "maker", "odm", "dev"],
"type": "symfony-bundle",
"repositories": [
{ "type": "github", "url": "https://github.com/GromNaN/symfony-maker-bundle" }
],
"require": {
"php": "^8.4",
"ext-mongodb": "^2.1",
"doctrine/mongodb-odm-bundle": "^5.5",
"symfony/maker-bundle": "^1.65",
"symfony/maker-bundle": "dev-develop",
"symfony/http-kernel": "^7.4|^8"
},
"require-dev": {
"doctrine/coding-standard": "^14",
"phpstan/phpstan": "^2.1.30",
"phpstan/phpstan-phpunit": "^2.0.7",
"phpunit/phpunit": "^12.5",
"symfony/framework-bundle": "^7.4|^8"
"symfony/framework-bundle": "^7.4|^8",
"twig/twig": "^3.22"
},
"license": "MIT",
"autoload": {
Expand Down
3 changes: 3 additions & 0 deletions config/help/MakeDocument.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The <info>%command.name%</info> command creates or updates a document and repository class.

<info>php %command.full_name% BlogPost</info>
20 changes: 19 additions & 1 deletion config/makers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,29 @@
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Doctrine\Bundle\MongoDBMakerBundle\Maker\MakeDocument;
use Doctrine\Bundle\MongoDBMakerBundle\MongoDB\DocumentClassGenerator;
use Doctrine\Bundle\MongoDBMakerBundle\MongoDB\MongoDBHelper;

return static function (ContainerConfigurator $container): void {
$services = $container->services();

$services->set('doctrine_mongodb_maker.mongodb_helper', MongoDBHelper::class)
->args([
service('doctrine_mongodb'),
]);

$services->set('doctrine_mongodb_maker.document_class_generator', DocumentClassGenerator::class)
->args([
service('maker.generator'),
service('doctrine_mongodb_maker.mongodb_helper'),
]);

$services->set('doctrine_mongodb_maker.maker.make_document', MakeDocument::class)
->args([])
->args([
service('maker.file_manager'),
service('doctrine_mongodb_maker.mongodb_helper'),
service('maker.generator'),
service('doctrine_mongodb_maker.document_class_generator'),
])
->tag('maker.command');
};
4 changes: 3 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

<file>config</file>
<file>src</file>
<file>tests</file>
<file>tests/TestKernel.php</file>
<file>tests/BundleTest.php</file>
<file>tests/Maker</file>

<rule ref="Doctrine" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" />
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ parameters:
paths:
- src
- tests
excludePaths:
- tests/tmp

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
failOnAllIssues="true"
displayDetailsOnAllIssues="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="MONGODB_URI" value="mongodb://localhost:27017" />
</php>

<testsuites>
<testsuite name="Doctrine MongoDB Maker Bundle Test Suite">
<directory>./tests/</directory>
Expand Down
Loading
Loading