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] Allow to autowire service_container #17261

Merged
merged 1 commit into from Jan 5, 2016

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Jan 4, 2016

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

@ad3n
Copy link

ad3n commented Jan 5, 2016

👍 thanks kevin @dunglas

@nicolas-grekas
Copy link
Member

👍

@fabpot
Copy link
Member

fabpot commented Jan 5, 2016

Thank you @dunglas.

@fabpot fabpot merged commit 4e2eef0 into symfony:2.8 Jan 5, 2016
fabpot added a commit that referenced this pull request Jan 5, 2016
…glas)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Allow to autowire service_container

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

Commits
-------

4e2eef0 [FrameworkBundle] Allow to autowire service_container
@fabpot fabpot mentioned this pull request Jan 14, 2016
@fabpot fabpot mentioned this pull request Feb 3, 2016
@dunglas dunglas deleted the service_container_autowire branch March 12, 2016 17:07
fabpot added a commit that referenced this pull request Mar 12, 2016
…or of other services (weaverryan)

This PR was merged into the 2.8 branch.

Discussion
----------

Autowiring the concrete class too - consistent with behavior of other services

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

This follows #17261. Without this, if you use the concrete class `Container`, it doesn't autowire, so it creates a *new* one. That is certainly not what the end-user wants, and it's a serious WTF :). We can talk all day long about not injecting the container and type-hinting interfaces, but this is needed to be consistent with how all the other services in the container work and to avoid this odd behavior.

Thanks!

Commits
-------

2ea3f68 Autowiring the concrete class too - consistent with behavior of other services
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

5 participants