Skip to content

Commit

Permalink
Improve MongoDB Bundle detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jun 15, 2019
1 parent 020bbc7 commit 3557fd8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
composer remove --dev --no-progress --no-update --ansi \
doctrine/mongodb-odm \
doctrine/mongodb-odm-bundle \
- sed -i '33,39d' tests/Fixtures/app/config/config_common.yml
- *update-project-dependencies
before_script:
- *clear-test-app-cache
Expand Down
13 changes: 13 additions & 0 deletions tests/Fixtures/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load

$c->loadFromExtension('security', $securityConfig);

if (class_exists(DoctrineMongoDBBundle::class)) {
$c->loadFromExtension('doctrine_mongodb', [
'connections' => [
'default' => null,
],
'document_managers' => [
'default' => [
'auto_mapping' => true,
],
],
]);
}

if ($_SERVER['LEGACY'] ?? true) {
$c->loadFromExtension('nelmio_api_doc', [
'sandbox' => [
Expand Down
7 changes: 0 additions & 7 deletions tests/Fixtures/app/config/config_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ doctrine:
auto_generate_proxy_classes: '%kernel.debug%'
auto_mapping: true

doctrine_mongodb:
connections:
default: ~
document_managers:
default:
auto_mapping: true

twig:
strict_variables: '%kernel.debug%'

Expand Down

0 comments on commit 3557fd8

Please sign in to comment.