Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #20167 [DependencyInjection] Make method (setter) autowiring …
…configurable (dunglas) This PR was merged into the 3.3-dev branch. Discussion ---------- [DependencyInjection] Make method (setter) autowiring configurable | Q | A | | --- | --- | | Branch? | master | | Bug fix? | no | | New feature? | yes | | BC breaks? | no | | Deprecations? | maybe? | | Tests pass? | yes | | Fixed tickets | #19631 | | License | MIT | | Doc PR | symfony/symfony-docs#7041 | Follow up of #19631. Implements #19631 (comment): Edit: the last supported format: ``` yaml services: foo: class: Foo autowire: ['__construct', 'set*'] # Autowire constructor and all setters autowire: true # Converted by loaders in `autowire: ['__construct']` for BC autowire: ['foo', 'bar'] # Autowire only `foo` and `bar` methods ``` Outdated: ``` yaml autowire: true # constructor autowiring autowire: [__construct, setFoo, setBar] # autowire whitelisted methods only autowire: '*' # autowire constructor + every setters (following existing rules for setters autowiring) ``` - [x] Allow to specify the list of methods in the XML loader - [x] Add tests for the YAML loader Commits ------- 6dd53c7 [DependencyInjection] Introduce method injection for autowiring
- Loading branch information
Showing
13 changed files
with
375 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.