This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml
Fabien Potencier 69dcf41a3c 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 https://github.com/symfony/symfony/pull/19631#issuecomment-240646169:

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
2016-12-13 16:48:43 +01:00
..
extension1 moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
extension2 moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
extensions moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
legacy_invalid_alias_definition.xml [DependencyInjection] Deprecate unsupported attributes/elements for alias 2016-01-16 15:18:32 +01:00
namespaces.xml [DependencyInjection] Use DOM instead of SimpleXML for namespace support 2014-04-02 17:32:21 +02:00
nonvalid.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services1.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services2.xml Merge branch '2.3' into 2.4 2014-09-17 11:45:32 +02:00
services3.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services4_bad_import.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services4.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services5.xml [DependencyInjection] Resolve aliases before removing abstract services + add tests 2016-04-06 19:38:23 +02:00
services6.xml Merge branch '2.8' into 3.0 2016-07-26 10:03:56 +02:00
services7.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services8.xml [DependencyInjection] Fix travis unit tests 2014-04-30 17:29:47 +02:00
services9.xml Merge branch '2.8' into 3.0 2016-07-26 10:03:56 +02:00
services10.xml Do normalization on tag options 2013-12-16 17:04:48 +01:00
services13.xml moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
services14.xml [DependencyInjection] Fix #10626, use better check on attribute existence and values on XML load 2014-04-03 14:00:33 +02:00
services21.xml make it possible to dump inlined services to XML 2015-03-23 20:17:28 +01:00
services22.xml [DependencyInjection] Add autowiring capabilities 2015-10-03 08:39:08 +02:00
services23.xml [DependencyInjection] Add autowiring capabilities 2015-10-03 08:39:08 +02:00
services24.xml [DependencyInjection] Add autowiring support to dumpers 2015-11-03 15:47:58 -08:00
services27.xml [DependencyInjection] Introduce method injection for autowiring 2016-12-02 09:49:57 +01:00
services28.xml [DependencyInjection] Introduce method injection for autowiring 2016-12-02 09:49:57 +01:00
services_deprecated.xml [DependencyInjection] Fixed deprecated default message template with XML 2016-07-26 18:50:32 +02:00
tag_with_empty_name.xml [DependencyInjection] enforce tags to have a name 2016-01-27 23:29:55 +01:00
tag_without_name.xml [DependencyInjection] enforce tags to have a name 2016-01-27 23:29:55 +01:00
with_key_outside_collection.xml Cast result to int before adding to it 2016-11-25 15:42:00 +01:00
withdoctype.xml Merge branch '2.0' 2012-08-28 09:54:42 +02:00