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.
Go to file
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
.composer Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
.github minor #20295 Define a GitHub issue template to avoid support questions (javiereguiluz) 2016-12-13 11:28:06 +01:00
src/Symfony feature #20167 [DependencyInjection] Make method (setter) autowiring configurable (dunglas) 2016-12-13 16:48:43 +01:00
.editorconfig Add EditorConfig File 2012-06-16 14:08:15 +02:00
.gitignore Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
.php_cs.dist Merge branch '2.7' into 2.8 2016-12-13 16:30:11 +01:00
.travis.yml Merge branch '3.1' 2016-11-18 16:17:59 -05:00
appveyor.yml Merge branch '3.1' 2016-11-18 16:17:59 -05:00
CHANGELOG-3.0.md Merge branch '2.8' into 3.1 2016-08-05 10:37:39 +02:00
CHANGELOG-3.1.md updated CHANGELOG for 3.1.8 2016-12-13 13:52:03 +01:00
CHANGELOG-3.2.md updated CHANGELOG for 3.2.1 2016-12-13 14:19:37 +01:00
composer.json updated version to 3.3 2016-11-19 12:35:20 -08:00
CONTRIBUTING.md Update contributing docs 2016-02-24 15:36:06 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.7.22 2016-12-13 11:53:11 +01:00
LICENSE Update copyright year 2016-01-01 23:53:47 -03:00
phpunit [travis/appveyor] Wire simple-phpunit 2016-09-12 17:58:10 +02:00
phpunit.xml.dist Make redis host configurable in tests 2016-09-19 12:25:01 -07:00
README.md Merge branch '2.8' into 3.1 2016-10-19 15:38:53 -07:00
UPGRADE-3.0.md Merge branch '2.8' into 3.1 2016-11-18 16:15:08 -05:00
UPGRADE-3.1.md [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize 2016-12-08 16:02:32 +01:00
UPGRADE-3.2.md [Routing] Mention minor BC break about UrlGenerator & query strings 2016-12-10 13:35:23 +01:00
UPGRADE-3.3.md replace DefinitionDecorator with ChildDefinition 2016-12-13 12:26:14 +01:00
UPGRADE-4.0.md replace DefinitionDecorator with ChildDefinition 2016-12-13 12:26:14 +01:00

README

What is Symfony?

Symfony is a PHP full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Installation

The best way to install Symfony is to use the official Symfony Installer. It allows you to start a new project based on the version you want.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony can help speed up your development and take the quality of your work to the next level, read the official Symfony documentation.

Contributing

Symfony is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section and use Pull Request Template.

Running Symfony Tests

Information on how to run the Symfony test suite can be found in the Running Symfony Tests section.