Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] Autowiring exception thrown when inlined service is removed #22993

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

Closed
wants to merge 3 commits into from

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented May 31, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? yes (on a new & internal method)
Tests pass? yes
Fixed tickets #22977
License MIT
Doc PR n/a

We suppress autowiring exceptions if a service is ultimately removed from the container. This fixes a bug where we incorrectly report that a service was NOT removed, when really, it WAS removed. This happens when ServiceA is inlined in ServiceB... but then ServiceB is removed from the container for being unused.

@weaverryan weaverryan force-pushed the fix-inline-unused-classes branch from 3375e6b to dd82f76 Compare May 31, 2017 14:36
@weaverryan
Copy link
Member Author

Second commit actually removes the getInlinedServiceIds() method. This has only existed since 3.3.0 - so it's a BC break, but is highly unlikely to be used. I'm fine with keeping it (deprecated) or removing it.

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.

👍 (including the "BC break" with .0 nobody can possibly rely on this already, and even if, that'd be fresh code, easy to update)

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone May 31, 2017
@fabpot
Copy link
Member

fabpot commented May 31, 2017

Thank you @weaverryan.

fabpot added a commit that referenced this pull request May 31, 2017
…emoved (weaverryan)

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

Discussion
----------

[DI] Autowiring exception thrown when inlined service is removed

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | yes (on a new & internal method)
| Tests pass?   | yes
| Fixed tickets | #22977
| License       | MIT
| Doc PR        | n/a

We suppress autowiring exceptions if a service is ultimately removed from the container. This fixes a bug where we incorrectly report that a service was NOT removed, when really, it WAS removed. This happens when `ServiceA` is inlined in `ServiceB`... but then `ServiceB` is removed from the container for being unused.

Commits
-------

793b9a0 [DI] Autowiring exception thrown when inlined service is removed
@fabpot fabpot closed this May 31, 2017
@weaverryan weaverryan deleted the fix-inline-unused-classes branch May 31, 2017 18:48
@fabpot fabpot mentioned this pull request Jun 5, 2017
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.

5 participants