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

Add priority support for tagged entity listeners #1135

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

ostrolucky
Copy link
Member

Fixes #991

@ostrolucky ostrolucky added this to the 2.1.0 milestone Feb 3, 2020
*/
public function testAbstractLazyEntityListener() : void
public function testAbstractEntityListener() : void
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a BC break, merely misleading test case. It DID throw even for non-lazy abstract listeners before.

@@ -62,10 +66,6 @@ public function process(ContainerBuilder $container)
if (! isset($attributes['lazy']) && $resolverSupportsLazyListeners || $lazyByAttribute) {
$listener = $container->findDefinition($id);

if ($listener->isAbstract()) {
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as this entity listener is lazy-loaded.', $id));
Copy link
Member Author

Choose a reason for hiding this comment

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

This check is done from within findAndSortTaggedServices now, so no need for it here anymore

Copy link
Contributor

@dmaicher dmaicher left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alcaeus
Copy link
Member

alcaeus commented Feb 4, 2020

Thanks @ostrolucky!

@alcaeus alcaeus merged commit ac31f33 into doctrine:master Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add priority support for tagged entity listeners
3 participants