Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MongoDB Bundle detection #2862

Merged
merged 1 commit into from
Jun 15, 2019
Merged
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: 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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but it's very weird for us to add use statements for the bundles. I mean, it's not usually done?

$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