Skip to content

Commit

Permalink
Autoload Doctrine's Entities mapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerendir committed Apr 7, 2018
1 parent 6092bff commit 7cc302a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -14,6 +14,7 @@
"php": "^7.1",
"ext-intl": "*",
"doctrine/common": "^2.5",
"doctrine/doctrine-bundle": "^1.8",
"doctrine/orm": "^2.5",
"serendipity_hq/php_array_writer": "^2.1",
"serendipity_hq/php_value_objects": "^4.0",
Expand Down
2 changes: 2 additions & 0 deletions src/SHQFeaturesBundle.php
Expand Up @@ -15,6 +15,7 @@

namespace SerendipityHQ\Bundle\FeaturesBundle;

use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use SerendipityHQ\Bundle\FeaturesBundle\DependencyInjection\CompilerPass\DrawersCompilerPass;
use SerendipityHQ\Bundle\FeaturesBundle\DependencyInjection\CompilerPass\FeaturesManagersCompilerPass;
use SerendipityHQ\Bundle\FeaturesBundle\DependencyInjection\CompilerPass\InvoiceManagersCompilerPass;
Expand All @@ -36,5 +37,6 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new FeaturesManagersCompilerPass());
$container->addCompilerPass(new InvoiceManagersCompilerPass());
$container->addCompilerPass(new DrawersCompilerPass());
$container->addCompilerPass(DoctrineOrmMappingsPass::createAnnotationMappingDriver(['SerendipityHQ\Bundle\FeaturesBundle\Model'], [realpath(__DIR__ . '/Model')]));
}
}

0 comments on commit 7cc302a

Please sign in to comment.