Skip to content

[DependencyInjection] moved up ResolveClassPass in the container pass list #21203

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
Jan 8, 2017

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jan 8, 2017

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

Some compiler passes need access to the service class names. But when using an empty class name (the service id being the class name), the resolution happens too late (during the optimization step). This PR fixes this by moving up the ResolveClassPass earlier in the stack.

@nicolas-grekas
Copy link
Member

👍

@GuilhemN
Copy link
Contributor

GuilhemN commented Jan 8, 2017

Shouldn't we define a priority on it to make sure it is not executed randomly between third party passes?

@fabpot fabpot force-pushed the resolve-class-pass-fix branch from 17912dc to 454f69b Compare January 8, 2017 18:19
@fabpot fabpot force-pushed the resolve-class-pass-fix branch from 454f69b to 2e5b69f Compare January 8, 2017 18:25
@fabpot fabpot merged commit 2e5b69f into symfony:master Jan 8, 2017
fabpot added a commit that referenced this pull request Jan 8, 2017
…tainer pass list (fabpot)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] moved up ResolveClassPass in the container pass list

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

Some compiler passes need access to the service class names. But when using an empty class name (the service id being the class name), the resolution happens too late (during the optimization step). This PR fixes this by moving up the ResolveClassPass earlier in the stack.

Commits
-------

2e5b69f [DependencyInjection] moved up ResolveClassPass in the container pass list
@fabpot fabpot deleted the resolve-class-pass-fix branch January 8, 2017 21:24
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.

4 participants