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

Pass the parameter connection when register doctrine post persister listener #37

Merged
merged 2 commits into from
Jul 20, 2018

Conversation

morinceline
Copy link

@morinceline morinceline commented Jul 20, 2018

Fix #35

@morinceline morinceline requested a review from Nek- July 20, 2018 10:07
@morinceline morinceline changed the title Pass the parameter connection when register doctrine post persister listener #35 Pass the parameter connection when register doctrine post persister listener Jul 20, 2018
@@ -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))
Copy link
Contributor

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?

Copy link
Author

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'));
Copy link
Contributor

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)

@morinceline morinceline force-pushed the fix/register-doctrine-connection branch from ef600d0 to 535e889 Compare July 20, 2018 13:33
"connection" => "custom_doctrine"
]
]

Copy link
Contributor

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 )

@morinceline morinceline force-pushed the fix/register-doctrine-connection branch from 535e889 to e41d37e Compare July 20, 2018 14:14
@Nek- Nek- merged commit 74d42cb into biig-io:master Jul 20, 2018
@Nek-
Copy link
Contributor

Nek- commented Jul 20, 2018

Thank you @morinceline !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants