Skip to content

Skip abstract definitions in compiler passes #22039

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

Merged
merged 1 commit into from
Mar 17, 2017

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Mar 17, 2017

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21761
License MIT
Doc PR n/a

@xabbuh
Copy link
Member

xabbuh commented Mar 17, 2017

👍

Status: Reviewed

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@GuilhemN GuilhemN left a comment

Choose a reason for hiding this comment

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

👍

@@ -32,12 +29,10 @@ public function testExceptionOnAbstractTaggedSubscriber()
$container->setDefinition('a', $abstractDefinition);

$this->process($container);
$this->assertSame(array(), $container->getDefinition('doctrine.dbal.default_connection.event_manager')->getMethodCalls());
Copy link
Contributor

Choose a reason for hiding this comment

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

assertEmpty()?

@fabpot
Copy link
Member

fabpot commented Mar 17, 2017

Thank you @chalasr.

@fabpot fabpot merged commit fc1ba0d into symfony:master Mar 17, 2017
fabpot added a commit that referenced this pull request Mar 17, 2017
This PR was merged into the 3.3-dev branch.

Discussion
----------

Skip abstract definitions in compiler passes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21761
| License       | MIT
| Doc PR        | n/a

Commits
-------

fc1ba0d Skip abstract definitions in compiler passes
@chalasr chalasr deleted the di-skip-abstract branch March 18, 2017 09:48
nicolas-grekas added a commit to nicolas-grekas/symfony that referenced this pull request Apr 13, 2017
…ses (chalasr)"

This reverts commit 207d068, reversing
changes made to 4836007.
fabpot added a commit that referenced this pull request Apr 13, 2017
…las-grekas)

This PR was squashed before being merged into the 3.3-dev branch (closes #22420).

Discussion
----------

[DI] Make tagged abstract services throw earlier

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As spotted by @stof in #22388 (comment), skipping abstract tagged services removes an opportunity to report config mistakes to users.

Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr).
I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic.
To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags.

Commits
-------

388e4b3 [DI] Make tagged abstract services throw earlier
cd06c12 Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants