-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Allow to change configurations in the dependency factory #959
Allow to change configurations in the dependency factory #959
Conversation
4dd77ad
to
7684400
Compare
…has already been provided
…e running the tests
7684400
to
a83b5d3
Compare
Functionality wise this has been tested in doctrine/DoctrineMigrationsBundle#311 (comment) |
@@ -63,6 +63,9 @@ protected function initialize(InputInterface $input, OutputInterface $output) : | |||
); | |||
$connectionLoader = new ConfigurationFile((string) $input->getOption('db-configuration')); | |||
$this->dependencyFactory = DependencyFactory::fromConnection($configurationLoader, $connectionLoader); | |||
} elseif (is_string($input->getOption('configuration'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please call $input->getOption('configuration')
once and use a variable?
@@ -91,6 +91,7 @@ public function testConnection() : void | |||
|
|||
self::assertSame($this->connection, $di->getConnection()); | |||
self::assertFalse($di->hasEntityManager()); | |||
self::assertTrue($di->isFrozen()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing explicitly if the DependencyFactory
. Does this mean that in the other tests it should be checked if it isn't frozen in case this is relevant for regressions?
f6ca1e8
to
2453b7e
Compare
@SenseException both notes you've left have been addressed in the last two commits |
Summary
Currently the Dependency Factory contains already all the configurations.
This allows to change configurations (not db connection or entity manager) even if they are already specified in the Dependency Factory