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

[FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases #22376

Merged
merged 1 commit into from Apr 11, 2017

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Apr 11, 2017

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

The services for which has() is called might be aliases at this point so getDefinition() gives an exception, I ran into by executing this pass but not the removing ones (skipping ReplaceAliasByActualDefinitionPass) while working on #16388. Let's make it safe to use independently.

@fabpot
Copy link
Member

fabpot commented Apr 11, 2017

Thank you @chalasr.

@fabpot fabpot merged commit 41f3d1f into symfony:master Apr 11, 2017
fabpot added a commit that referenced this pull request Apr 11, 2017
…ition() on aliases (chalasr)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases

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

The services for which `has()` is called might be aliases at this point so `getDefinition()` gives an exception, I ran into by executing this pass but not the removing ones (skipping ReplaceAliasByActualDefinitionPass) while working on #16388. Let's make it safe to use independently.

Commits
-------

41f3d1f Use findDefinition() instead of getDefinition() after calling has()
@chalasr chalasr deleted the find-def branch April 11, 2017 15:57
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.

None yet

3 participants