-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pass the parameter connection when register doctrine post persister listener #37
Pass the parameter connection when register doctrine post persister listener #37
Conversation
@@ -78,7 +78,7 @@ private function registerDoctrinePostPersistListener(array $config, ContainerBui | |||
DoctrinePostPersistListener::class | |||
) | |||
->setArgument(0, new Reference('biig_domain.dispatcher')) | |||
->addTag('doctrine.event_subscriber', array('connection' => 'default')) | |||
->addTag('doctrine.event_subscriber', array('connection' => $connection)) |
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 add the related test please?
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.
yes ;)
], | ||
]]; | ||
|
||
$container = new ContainerBuilder(); | ||
$extension->load($config, $container); | ||
|
||
$this->assertTrue($container->hasDefinition('biig_domain.post_persist_listener.doctrine_default')); | ||
$this->assertTrue($container->hasDefinition('biig_domain.post_persist_listener.doctrine_custom_doctrine')); |
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.
It does not test the tags (which is what you fixed)
ef600d0
to
535e889
Compare
"connection" => "custom_doctrine" | ||
] | ||
] | ||
|
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.
please remove this space :) . And all is ok! (you can execute php-cs-fixer here https://github.com/biig-io/DomainComponent/blob/master/.php_cs.dist )
535e889
to
e41d37e
Compare
Thank you @morinceline ! |
Fix #35