Skip to content

[DI] Generalize constructor autowiring to partial method calls #21404

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 25, 2017

Conversation

nicolas-grekas
Copy link
Member

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

When autowiring is enabled:

currently, the constructor can be partially wired, and autowiring will complete the remaining missing arguments.
But there is no reason this should only apply to the constructor.
This PR fixes this inconsistency by looking at all method calls, and wire missing arguments in the same way.

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Jan 25, 2017
@dunglas
Copy link
Member

dunglas commented Jan 25, 2017

👍

@stof
Copy link
Member

stof commented Jan 25, 2017

looks good to me

@fabpot
Copy link
Member

fabpot commented Jan 25, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 29c2fd5 into symfony:master Jan 25, 2017
fabpot added a commit that referenced this pull request Jan 25, 2017
…od calls (nicolas-grekas)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Generalize constructor autowiring to partial method calls

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

When autowiring is enabled:

currently, the constructor can be partially wired, and autowiring will complete the remaining missing arguments.
But there is no reason this should only apply to the constructor.
This PR fixes this inconsistency by looking at all method calls, and wire missing arguments in the same way.

Commits
-------

29c2fd5 [DI] Generalize constructor autowiring to partial method calls
@nicolas-grekas nicolas-grekas deleted the autow-partials branch January 30, 2017 20:27
@fabpot fabpot mentioned this pull request May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants