diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
index 3279bb7826..aa0b8af9b3 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
@@ -220,9 +220,13 @@ class JsonDescriptor extends Descriptor
'lazy' => $definition->isLazy(),
'shared' => $definition->isShared(),
'abstract' => $definition->isAbstract(),
- 'autowire' => $definition->isAutowired(),
);
+ $autowiredCalls = array_values(array_filter($definition->getAutowiredCalls(), function ($method) {
+ return $method !== '__construct';
+ }));
+ $data['autowire'] = $definition->isAutowired() ? ($autowiredCalls ?: true) : false;
+
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
$data['autowiring_types'][] = $autowiringType;
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
index c0319aad6b..7f595f059e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
@@ -182,9 +182,16 @@ class MarkdownDescriptor extends Descriptor
."\n".'- Lazy: '.($definition->isLazy() ? 'yes' : 'no')
."\n".'- Shared: '.($definition->isShared() ? 'yes' : 'no')
."\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no')
- ."\n".'- Autowired: '.($definition->isAutowired() ? 'yes' : 'no')
;
+ $autowiredCalls = array_filter($definition->getAutowiredCalls(), function ($method) {
+ return $method !== '__construct';
+ });
+ $output .= "\n".'- Autowire: ';
+ $output .= $definition->isAutowired() ? ($autowiredCalls ? implode(', ', array_map(function ($method) {
+ return "`$method`";
+ }, $autowiredCalls)) : 'yes') : 'no';
+
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
$output .= "\n".'- Autowiring Type: `'.$autowiringType.'`';
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
index 3de59185e8..64afc57629 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
@@ -295,7 +295,11 @@ class TextDescriptor extends Descriptor
$tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no');
$tableRows[] = array('Shared', $definition->isShared() ? 'yes' : 'no');
$tableRows[] = array('Abstract', $definition->isAbstract() ? 'yes' : 'no');
- $tableRows[] = array('Autowired', $definition->isAutowired() ? 'yes' : 'no');
+
+ $autowiredCalls = array_filter($definition->getAutowiredCalls(), function ($method) {
+ return $method !== '__construct';
+ });
+ $tableRows[] = array('Autowire', $definition->isAutowired() ? ($autowiredCalls ? implode("\n", $autowiredCalls) : 'yes') : 'no');
if ($autowiringTypes = $definition->getAutowiringTypes(false)) {
$tableRows[] = array('Autowiring Types', implode(', ', $autowiringTypes));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
index c5b42e3bab..e15f88cf83 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
@@ -374,6 +374,18 @@ class XmlDescriptor extends Descriptor
$serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false');
$serviceXML->setAttribute('file', $definition->getFile());
+ $autowiredCalls = array_filter($definition->getAutowiredCalls(), function ($method) {
+ return $method !== '__construct';
+ });
+ if ($autowiredCalls) {
+ $serviceXML->appendChild($autowiredMethodsXML = $dom->createElement('autowired-calls'));
+ foreach ($autowiredCalls as $autowiredMethod) {
+ $autowiredMethodXML = $dom->createElement('autowired-call');
+ $autowiredMethodXML->appendChild(new \DOMText($autowiredMethod));
+ $autowiredMethodsXML->appendChild($autowiredMethodXML);
+ }
+ }
+
$calls = $definition->getMethodCalls();
if (count($calls) > 0) {
$serviceXML->appendChild($callsXML = $dom->createElement('calls'));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
index b89902fe54..896e07988c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
@@ -137,6 +137,9 @@ class ObjectsProvider
->addTag('tag2')
->addMethodCall('setMailer', array(new Reference('mailer')))
->setFactory(array(new Reference('factory.service'), 'get')),
+ 'definition_autowired' => (new Definition('AutowiredService'))->setAutowired(true),
+ 'definition_autowired_with_methods' => (new Definition('AutowiredService'))
+ ->setAutowiredCalls(array('__construct', 'set*', 'addFoo')),
);
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.md
index cb539aa795..7dd6bff843 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.md
@@ -11,6 +11,6 @@
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Factory Class: `Full\Qualified\FactoryClass`
- Factory Method: `get`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.txt
index 75347e1a0e..cd5ca89a87 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_1.txt
@@ -14,7 +14,7 @@
Lazy yes
Shared yes
Abstract yes
- Autowired no
+ Autowire no
Factory Class Full\Qualified\FactoryClass
Factory Method get
---------------- -----------------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md
index 6ebc5b8512..c5aec5b130 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md
@@ -11,7 +11,7 @@
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt
index dd639178f6..1156e0fa53 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt
@@ -17,7 +17,7 @@
Lazy no
Shared yes
Abstract no
- Autowired no
+ Autowire no
Required File /path/to/file
Factory Service factory.service
Factory Method get
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.json
index 241cade908..0ec20042a4 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.json
@@ -80,6 +80,33 @@
"factory_class": "Full\\Qualified\\FactoryClass",
"factory_method": "get",
"tags": []
+ },
+ "definition_autowired": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": true,
+ "arguments": [],
+ "file": null,
+ "tags": []
+ },
+ "definition_autowired_with_methods": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": [
+ "set*",
+ "addFoo"
+ ],
+ "arguments": [],
+ "file": null,
+ "tags": []
}
},
"aliases": {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.md
index 1f1635e581..f48cee730c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.md
@@ -12,11 +12,33 @@ Definitions
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Arguments: yes
- Factory Class: `Full\Qualified\FactoryClass`
- Factory Method: `get`
+### definition_autowired
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: yes
+- Arguments: no
+
+### definition_autowired_with_methods
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: `set*`, `addFoo`
+- Arguments: no
+
Aliases
-------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.txt
index 0e42596b99..32e79d7d6d 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.txt
@@ -2,12 +2,14 @@
[33mSymfony Container Public Services[39m
[33m=================================[39m
- ------------------- --------------------------------------------------------
- [32m Service ID [39m [32m Class name [39m
- ------------------- --------------------------------------------------------
- alias_1 alias for "service_1"
- alias_2 alias for "service_2"
- definition_1 Full\Qualified\Class1
- service_container Symfony\Component\DependencyInjection\ContainerBuilder
- ------------------- --------------------------------------------------------
+ ----------------------------------- --------------------------------------------------------
+ [32m Service ID [39m [32m Class name [39m
+ ----------------------------------- --------------------------------------------------------
+ alias_1 alias for "service_1"
+ alias_2 alias for "service_2"
+ definition_1 Full\Qualified\Class1
+ definition_autowired AutowiredService
+ definition_autowired_with_methods AutowiredService
+ service_container Symfony\Component\DependencyInjection\ContainerBuilder
+ ----------------------------------- --------------------------------------------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.xml
index 930fc5204a..4fd02ed4b6 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_arguments.xml
@@ -29,5 +29,12 @@
+
+
+
+ set*
+ addFoo
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
index 43cf434d26..feeeb5a1fb 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
@@ -12,6 +12,31 @@
"factory_class": "Full\\Qualified\\FactoryClass",
"factory_method": "get",
"tags": []
+ },
+ "definition_autowired": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": true,
+ "file": null,
+ "tags": []
+ },
+ "definition_autowired_with_methods": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": [
+ "set*",
+ "addFoo"
+ ],
+ "file": null,
+ "tags": []
}
},
"aliases": {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
index d21d180536..c304073dc2 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
@@ -12,10 +12,30 @@ Definitions
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Factory Class: `Full\Qualified\FactoryClass`
- Factory Method: `get`
+### definition_autowired
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: yes
+
+### definition_autowired_with_methods
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: `set*`, `addFoo`
+
Aliases
-------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt
index 0e42596b99..32e79d7d6d 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt
@@ -2,12 +2,14 @@
[33mSymfony Container Public Services[39m
[33m=================================[39m
- ------------------- --------------------------------------------------------
- [32m Service ID [39m [32m Class name [39m
- ------------------- --------------------------------------------------------
- alias_1 alias for "service_1"
- alias_2 alias for "service_2"
- definition_1 Full\Qualified\Class1
- service_container Symfony\Component\DependencyInjection\ContainerBuilder
- ------------------- --------------------------------------------------------
+ ----------------------------------- --------------------------------------------------------
+ [32m Service ID [39m [32m Class name [39m
+ ----------------------------------- --------------------------------------------------------
+ alias_1 alias for "service_1"
+ alias_2 alias for "service_2"
+ definition_1 Full\Qualified\Class1
+ definition_autowired AutowiredService
+ definition_autowired_with_methods AutowiredService
+ service_container Symfony\Component\DependencyInjection\ContainerBuilder
+ ----------------------------------- --------------------------------------------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml
index 52031e59aa..4c8d30dcc9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml
@@ -5,5 +5,12 @@
+
+
+
+ set*
+ addFoo
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
index 794a10a1c7..e9bbba1ab6 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
@@ -46,6 +46,31 @@
"parameters": []
}
]
+ },
+ "definition_autowired": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": true,
+ "file": null,
+ "tags": []
+ },
+ "definition_autowired_with_methods": {
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": [
+ "set*",
+ "addFoo"
+ ],
+ "file": null,
+ "tags": []
}
},
"aliases": {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
index 26ea2f007e..b9fa72daa9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
@@ -12,7 +12,7 @@ Definitions
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Factory Class: `Full\Qualified\FactoryClass`
- Factory Method: `get`
@@ -24,7 +24,7 @@ Definitions
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
@@ -36,6 +36,26 @@ Definitions
- Attr3: val3
- Tag: `tag2`
+### definition_autowired
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: yes
+
+### definition_autowired_with_methods
+
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: `set*`, `addFoo`
+
Aliases
-------
@@ -54,4 +74,4 @@ Aliases
Services
--------
-- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
+- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt
index e23ea6d81f..b67984462a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt
@@ -2,13 +2,15 @@
[33mSymfony Container Public and Private Services[39m
[33m=============================================[39m
- ------------------- --------------------------------------------------------
- [32m Service ID [39m [32m Class name [39m
- ------------------- --------------------------------------------------------
- alias_1 alias for "service_1"
- alias_2 alias for "service_2"
- definition_1 Full\Qualified\Class1
- definition_2 Full\Qualified\Class2
- service_container Symfony\Component\DependencyInjection\ContainerBuilder
- ------------------- --------------------------------------------------------
+ ----------------------------------- --------------------------------------------------------
+ [32m Service ID [39m [32m Class name [39m
+ ----------------------------------- --------------------------------------------------------
+ alias_1 alias for "service_1"
+ alias_2 alias for "service_2"
+ definition_1 Full\Qualified\Class1
+ definition_2 Full\Qualified\Class2
+ definition_autowired AutowiredService
+ definition_autowired_with_methods AutowiredService
+ service_container Symfony\Component\DependencyInjection\ContainerBuilder
+ ----------------------------------- --------------------------------------------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml
index bde934fa50..8bb8ac1495 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml
@@ -21,5 +21,12 @@
+
+
+
+ set*
+ addFoo
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
index e3dcc59f43..77533245b5 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
@@ -12,7 +12,7 @@ Definitions
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
index a0e1bcd1c4..0a3d1e418c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
@@ -12,7 +12,7 @@ tag1
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
@@ -30,7 +30,7 @@ tag2
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md
index b1d46b69f4..5a1a2074b9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md
@@ -4,6 +4,6 @@
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Factory Class: `Full\Qualified\FactoryClass`
-- Factory Method: `get`
+- Factory Method: `get`
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
index 596d918579..c642517d86 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
@@ -9,7 +9,7 @@
Lazy yes
Shared yes
Abstract yes
- Autowired no
+ Autowire no
Factory Class Full\Qualified\FactoryClass
Factory Method get
---------------- -----------------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md
index 1f097a2585..991d377a3f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md
@@ -4,7 +4,7 @@
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- File: `/path/to/file`
- Factory Service: `factory.service`
- Factory Method: `get`
@@ -14,4 +14,4 @@
- Attr2: val2
- Tag: `tag1`
- Attr3: val3
-- Tag: `tag2`
+- Tag: `tag2`
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
index 512845c9ec..3ba4eeee18 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
@@ -12,7 +12,7 @@
Lazy no
Shared yes
Abstract no
- Autowired no
+ Autowire no
Required File /path/to/file
Factory Service factory.service
Factory Method get
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.md
index b4637aa023..494ba9a2a5 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.md
@@ -4,7 +4,7 @@
- Lazy: yes
- Shared: yes
- Abstract: yes
-- Autowired: no
+- Autowire: no
- Arguments: yes
- Factory Class: `Full\Qualified\FactoryClass`
-- Factory Method: `get`
\ No newline at end of file
+- Factory Method: `get`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt
index b0fd0acd7a..29d70ddf43 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt
@@ -9,7 +9,7 @@
Lazy yes
Shared yes
Abstract yes
- Autowired no
+ Autowire no
Factory Class Full\Qualified\FactoryClass
Factory Method get
Arguments Service(definition2)
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md
index 7ffe0e551a..d9ba83b599 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.md
@@ -4,7 +4,7 @@
- Lazy: no
- Shared: yes
- Abstract: no
-- Autowired: no
+- Autowire: no
- Arguments: no
- File: `/path/to/file`
- Factory Service: `factory.service`
@@ -15,4 +15,4 @@
- Attr2: val2
- Tag: `tag1`
- Attr3: val3
-- Tag: `tag2`
\ No newline at end of file
+- Tag: `tag2`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt
index 512845c9ec..3ba4eeee18 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt
@@ -12,7 +12,7 @@
Lazy no
Shared yes
Abstract no
- Autowired no
+ Autowire no
Required File /path/to/file
Factory Service factory.service
Factory Method get
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.json
new file mode 100644
index 0000000000..6e65744c21
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.json
@@ -0,0 +1,12 @@
+{
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": true,
+ "arguments": [],
+ "file": null,
+ "tags": []
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.md
new file mode 100644
index 0000000000..b037b7d226
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.md
@@ -0,0 +1,8 @@
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: yes
+- Arguments: no
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.txt
new file mode 100644
index 0000000000..76c7ed49fe
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.txt
@@ -0,0 +1,14 @@
+ ------------ ------------------
+ [32m Option [39m [32m Value [39m
+ ------------ ------------------
+ Service ID -
+ Class AutowiredService
+ Tags -
+ Public yes
+ Synthetic no
+ Lazy no
+ Shared yes
+ Abstract no
+ Autowire yes
+ ------------ ------------------
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.xml
new file mode 100644
index 0000000000..aec043d998
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.json
new file mode 100644
index 0000000000..88137d47d8
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.json
@@ -0,0 +1,15 @@
+{
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": [
+ "set*",
+ "addFoo"
+ ],
+ "arguments": [],
+ "file": null,
+ "tags": []
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.md
new file mode 100644
index 0000000000..a5384040a9
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.md
@@ -0,0 +1,8 @@
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: `set*`, `addFoo`
+- Arguments: no
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.txt
new file mode 100644
index 0000000000..ffd2140dab
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.txt
@@ -0,0 +1,15 @@
+ ------------ ------------------
+ [32m Option [39m [32m Value [39m
+ ------------ ------------------
+ Service ID -
+ Class AutowiredService
+ Tags -
+ Public yes
+ Synthetic no
+ Lazy no
+ Shared yes
+ Abstract no
+ Autowire set*
+ addFoo
+ ------------ ------------------
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.xml
new file mode 100644
index 0000000000..ba4df1bbab
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_autowired_with_methods.xml
@@ -0,0 +1,7 @@
+
+
+
+ set*
+ addFoo
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.json
new file mode 100644
index 0000000000..a11ca5bae9
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.json
@@ -0,0 +1,11 @@
+{
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": true,
+ "file": null,
+ "tags": []
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.md
new file mode 100644
index 0000000000..f87bc83d73
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.md
@@ -0,0 +1,7 @@
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: yes
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.txt
new file mode 100644
index 0000000000..76c7ed49fe
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.txt
@@ -0,0 +1,14 @@
+ ------------ ------------------
+ [32m Option [39m [32m Value [39m
+ ------------ ------------------
+ Service ID -
+ Class AutowiredService
+ Tags -
+ Public yes
+ Synthetic no
+ Lazy no
+ Shared yes
+ Abstract no
+ Autowire yes
+ ------------ ------------------
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.xml
new file mode 100644
index 0000000000..aec043d998
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.json
new file mode 100644
index 0000000000..576a2ee669
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.json
@@ -0,0 +1,14 @@
+{
+ "class": "AutowiredService",
+ "public": true,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": [
+ "set*",
+ "addFoo"
+ ],
+ "file": null,
+ "tags": []
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.md
new file mode 100644
index 0000000000..20059b657e
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.md
@@ -0,0 +1,7 @@
+- Class: `AutowiredService`
+- Public: yes
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowire: `set*`, `addFoo`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.txt
new file mode 100644
index 0000000000..ffd2140dab
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.txt
@@ -0,0 +1,15 @@
+ ------------ ------------------
+ [32m Option [39m [32m Value [39m
+ ------------ ------------------
+ Service ID -
+ Class AutowiredService
+ Tags -
+ Public yes
+ Synthetic no
+ Lazy no
+ Shared yes
+ Abstract no
+ Autowire set*
+ addFoo
+ ------------ ------------------
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.xml
new file mode 100644
index 0000000000..ba4df1bbab
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_autowired_with_methods.xml
@@ -0,0 +1,7 @@
+
+
+
+ set*
+ addFoo
+
+