From 82054bc1eb8a9261344aa006fd9fbec4308ba203 Mon Sep 17 00:00:00 2001 From: Antoine Makdessi Date: Tue, 5 Jul 2022 10:12:10 +0200 Subject: [PATCH] [FrameworkBundle] Add service and alias deprecation message to debug:container output --- src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 1 + .../Command/ContainerDebugCommand.php | 15 +++++++++++++++ .../Console/Descriptor/JsonDescriptor.php | 7 +++++++ .../Console/Descriptor/MarkdownDescriptor.php | 7 +++++++ .../Console/Descriptor/XmlDescriptor.php | 6 ++++++ .../Tests/Fixtures/DeprecatedClass.php | 10 ++++++++++ .../Descriptor/alias_with_definition_1.json | 1 + .../Descriptor/alias_with_definition_1.md | 1 + .../Descriptor/alias_with_definition_1.xml | 2 +- .../Descriptor/alias_with_definition_2.json | 1 + .../Descriptor/alias_with_definition_2.md | 1 + .../Descriptor/alias_with_definition_2.xml | 2 +- .../Fixtures/Descriptor/builder_1_arguments.json | 5 +++++ .../Fixtures/Descriptor/builder_1_arguments.md | 3 +++ .../Fixtures/Descriptor/builder_1_arguments.xml | 10 +++++----- .../Fixtures/Descriptor/builder_1_public.json | 3 +++ .../Fixtures/Descriptor/builder_1_public.md | 3 +++ .../Fixtures/Descriptor/builder_1_public.xml | 6 +++--- .../Fixtures/Descriptor/builder_1_services.json | 1 + .../Fixtures/Descriptor/builder_1_services.md | 1 + .../Fixtures/Descriptor/builder_1_services.xml | 2 +- .../Fixtures/Descriptor/builder_1_tag1.json | 1 + .../Tests/Fixtures/Descriptor/builder_1_tag1.md | 1 + .../Tests/Fixtures/Descriptor/builder_1_tag1.xml | 2 +- .../Fixtures/Descriptor/builder_1_tags.json | 2 ++ .../Tests/Fixtures/Descriptor/builder_1_tags.md | 2 ++ .../Tests/Fixtures/Descriptor/builder_1_tags.xml | 4 ++-- .../Descriptor/builder_priority_tag.json | 4 ++++ .../Fixtures/Descriptor/builder_priority_tag.md | 4 ++++ .../Fixtures/Descriptor/builder_priority_tag.xml | 8 ++++---- .../Tests/Fixtures/Descriptor/definition_1.json | 1 + .../Tests/Fixtures/Descriptor/definition_1.md | 1 + .../Tests/Fixtures/Descriptor/definition_1.xml | 2 +- .../Tests/Fixtures/Descriptor/definition_2.json | 1 + .../Tests/Fixtures/Descriptor/definition_2.md | 1 + .../Tests/Fixtures/Descriptor/definition_2.xml | 2 +- .../Descriptor/definition_arguments_1.json | 3 +++ .../Descriptor/definition_arguments_1.md | 1 + .../Descriptor/definition_arguments_1.xml | 6 +++--- .../Descriptor/definition_arguments_2.json | 1 + .../Descriptor/definition_arguments_2.md | 1 + .../Descriptor/definition_arguments_2.xml | 2 +- .../definition_arguments_with_enum.json | 1 + .../Descriptor/definition_arguments_with_enum.md | 1 + .../definition_arguments_with_enum.xml | 2 +- .../definition_arguments_without_class.json | 1 + .../definition_arguments_without_class.md | 1 + .../definition_arguments_without_class.xml | 2 +- .../Descriptor/definition_without_class.json | 1 + .../Descriptor/definition_without_class.md | 1 + .../Descriptor/definition_without_class.xml | 2 +- .../Descriptor/existing_class_def_1.json | 1 + .../Fixtures/Descriptor/existing_class_def_1.md | 1 + .../Fixtures/Descriptor/existing_class_def_1.xml | 2 +- .../Descriptor/existing_class_def_2.json | 1 + .../Fixtures/Descriptor/existing_class_def_2.md | 1 + .../Fixtures/Descriptor/existing_class_def_2.xml | 2 +- .../Functional/ContainerDebugCommandTest.php | 16 ++++++++++++++++ .../Functional/app/ContainerDebug/config.yml | 12 ++++++++++++ 59 files changed, 157 insertions(+), 29 deletions(-) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeprecatedClass.php diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 772e7d6c3f26d..8bfbc84b52434 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG `Symfony\Component\Serializer\Normalizer\PropertyNormalizer` autowiring aliases, type-hint against `Symfony\Component\Serializer\Normalizer\NormalizerInterface` or implement `NormalizerAwareInterface` instead * Add service usages list to the `debug:container` command output + * Add service and alias deprecation message to `debug:container []` output 6.1 --- diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index c5c2da4a4407c..a0f484db7b268 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -166,6 +166,21 @@ protected function execute(InputInterface $input, OutputInterface $output): int try { $helper->describe($io, $object, $options); + if ('txt' === $options['format'] && isset($options['id'])) { + if ($object->hasDefinition($options['id'])) { + $definition = $object->getDefinition($options['id']); + if ($definition->isDeprecated()) { + $errorIo->warning($definition->getDeprecation($options['id'])['message'] ?? sprintf('The "%s" service is deprecated.', $options['id'])); + } + } + if ($object->hasAlias($options['id'])) { + $alias = $object->getAlias($options['id']); + if ($alias->isDeprecated()) { + $errorIo->warning($alias->getDeprecation($options['id'])['message'] ?? sprintf('The "%s" alias is deprecated.', $options['id'])); + } + } + } + if (isset($options['id']) && isset($kernel->getContainer()->getRemovedIds()[$options['id']])) { $errorIo->note(sprintf('The "%s" service or alias has been removed or inlined when the container was compiled.', $options['id'])); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 1ad4ad751f357..1c0cfa5c6d936 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -230,6 +230,13 @@ private function getContainerDefinitionData(Definition $definition, bool $omitTa 'autoconfigure' => $definition->isAutoconfigured(), ]; + if ($definition->isDeprecated()) { + $data['deprecated'] = true; + $data['deprecation_message'] = $definition->getDeprecation($id)['message']; + } else { + $data['deprecated'] = false; + } + if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { $data['description'] = $classDescription; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 851d565f70f5d..111578a84b1d2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -211,6 +211,13 @@ protected function describeContainerDefinition(Definition $definition, array $op ."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no') ; + if ($definition->isDeprecated()) { + $output .= "\n".'- Deprecated: yes'; + $output .= "\n".'- Deprecation message: '.$definition->getDeprecation($options['id'])['message']; + } else { + $output .= "\n".'- Deprecated: no'; + } + if (isset($options['show_arguments']) && $options['show_arguments']) { $output .= "\n".'- Arguments: '.($definition->getArguments() ? 'yes' : 'no'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 4740d5898e736..414c526603d6d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -341,6 +341,12 @@ private function getContainerDefinitionDocument(Definition $definition, string $ $serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false'); $serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false'); $serviceXML->setAttribute('autoconfigured', $definition->isAutoconfigured() ? 'true' : 'false'); + if ($definition->isDeprecated()) { + $serviceXML->setAttribute('deprecated', 'true'); + $serviceXML->setAttribute('deprecation_message', $definition->getDeprecation($id)['message']); + } else { + $serviceXML->setAttribute('deprecated', 'false'); + } $serviceXML->setAttribute('file', $definition->getFile() ?? ''); $calls = $definition->getMethodCalls(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeprecatedClass.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeprecatedClass.php new file mode 100644 index 0000000000000..70a400f6efdff --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeprecatedClass.php @@ -0,0 +1,10 @@ + - + alias_1 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json index 63e19791772eb..419ee67863813 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json @@ -12,6 +12,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "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.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md index 0ac04d1ae98b9..d25978492e100 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 @@ -13,6 +13,7 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: 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.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml index 09ede9ce11989..f9d5c70c80171 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml @@ -1,6 +1,6 @@ - + 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 6333dbd0cc674..28d64c611753a 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 @@ -9,6 +9,7 @@ "abstract": true, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [ { "type": "service", @@ -24,6 +25,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [ "arg1", "arg2" @@ -47,6 +49,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [], "file": null, "tags": [], @@ -83,6 +86,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [], "file": null, "tags": [], @@ -97,6 +101,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "description": "ContainerInterface is the interface implemented by service container classes.", "arguments": [], "file": null, 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 fca3ab98bb46e..57a209ecb95cc 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 @@ -14,6 +14,7 @@ Definitions - Abstract: yes - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: yes - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` @@ -29,6 +30,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: no - Usages: none @@ -43,6 +45,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: no - Usages: none 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 3a51fa1646908..fdddad6537440 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 @@ -1,12 +1,12 @@ - + %parameter% - + arg1 arg2 @@ -15,7 +15,7 @@ foo - + @@ -24,8 +24,8 @@ placeholder - - + + 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 473d9563512f1..0d6198b07e3a2 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 @@ -9,6 +9,7 @@ "abstract": true, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": null, "factory_class": "Full\\Qualified\\FactoryClass", "factory_method": "get", @@ -24,6 +25,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": null, "tags": [], "usages": [] @@ -37,6 +39,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "description": "ContainerInterface is the interface implemented by service container classes.", "file": null, "tags": [], 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 89373fae25c5e..2532a2c4eea58 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 @@ -14,6 +14,7 @@ Definitions - Abstract: yes - Autowired: no - Autoconfigured: no +- Deprecated: no - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` - Usages: none @@ -28,6 +29,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Usages: none ### service_container @@ -41,6 +43,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Usages: none 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 05f83391f6208..3b13b72643b76 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 @@ -1,11 +1,11 @@ - + - - + + 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 a9c08e3eaacc3..c7c250588e1c1 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 @@ -9,6 +9,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", 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 00a0f12cd5362..8fa93a54852b8 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 @@ -14,6 +14,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` 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 a311a2e2bb991..ebff5bc3029de 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 @@ -1,7 +1,7 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json index 0b437208258f4..66eb0af836225 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json @@ -9,6 +9,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", 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 cce05adc843e6..a76b77df04e55 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 @@ -14,6 +14,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml index 6dd2fc6173b10..b2929b01ac403 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml @@ -1,6 +1,6 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json index 44f6c95977b36..e0679f2cac58d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json @@ -9,6 +9,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", @@ -28,6 +29,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "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 2067aa1a52493..f9558d326e7b3 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 @@ -14,6 +14,7 @@ tag1 - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` @@ -34,6 +35,7 @@ tag2 - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: 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.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml index 77975ee27c639..75a9714f5d8a6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json index c3e3ed9f617e9..75d893297cd24 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json @@ -9,6 +9,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "tags": [ { @@ -38,6 +39,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", @@ -74,6 +76,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "tags": [ { @@ -94,6 +97,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "tags": [ { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md index 3cc1ab25d7074..7137e1b1d81d1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md @@ -14,6 +14,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Tag: `tag1` - Attr3: val3 @@ -34,6 +35,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` @@ -56,6 +58,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Tag: `tag1` - Priority: 0 @@ -71,6 +74,7 @@ Definitions - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Tag: `tag1` - Attr1: val1 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml index 2e00c99955257..4bbdbfe5f3f44 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml @@ -1,6 +1,6 @@ - + val3 @@ -13,7 +13,7 @@ - + @@ -29,14 +29,14 @@ - + 0 - + val1 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json index 076829018dfa0..735b3df470887 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json @@ -7,6 +7,7 @@ "abstract": true, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": null, "factory_class": "Full\\Qualified\\FactoryClass", "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 ac87f52b054d5..c7ad62954ebc3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md @@ -6,6 +6,7 @@ - Abstract: yes - Autowired: no - Autoconfigured: no +- Deprecated: no - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml index d5015fdde3bd7..be2b16b57ffa7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml @@ -1,4 +1,4 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json index 6b0e66b283f8d..622904da2ef86 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "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 36d70dc7d47b6..376cbdb52348b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md @@ -6,6 +6,7 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml index 72319eca97a4c..ab072f3e3adf5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml @@ -1,5 +1,5 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.json index 4a152fe97b95a..b0a612030cae1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.json @@ -7,6 +7,7 @@ "abstract": true, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [ { "type": "service", @@ -22,6 +23,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [ "arg1", "arg2" @@ -45,6 +47,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [], "file": null, "tags": [], 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 0193f0d94e1e2..b99162bbf439d 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 @@ -6,6 +6,7 @@ - Abstract: yes - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: yes - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.xml index b71fe8e144b68..eba7e7bbdcd7f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_1.xml @@ -1,10 +1,10 @@ - + %parameter% - + arg1 arg2 @@ -13,7 +13,7 @@ foo - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json index 28c165abcde77..20ef01a34b7a5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [], "file": "\/path\/to\/file", "factory_service": "factory.service", 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 b83cb05e6463d..f5bf50e61764c 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 @@ -6,6 +6,7 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: no - File: `/path/to/file` - Factory Service: `factory.service` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml index 72319eca97a4c..ab072f3e3adf5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml @@ -1,5 +1,5 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json index bdc87fa303e4d..08f69f738c9ef 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\FooUnitEnum::FOO" ], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md index 23fabe99c085c..794c9710fc994 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md @@ -6,5 +6,6 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: yes - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml index cb58a6d935e97..7a555ae165b5e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml @@ -1,4 +1,4 @@ - + Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::FOO diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.json index edf9cc70c0a37..c1305ac0c56c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "arguments": [], "file": null, "tags": [], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.md index e241cbe5fb659..7c7bad74dcf06 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.md @@ -6,5 +6,6 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Arguments: no - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.xml index ee6df8928e245..2ebeaf8dfcb4c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_without_class.xml @@ -1,2 +1,2 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.json index a4d0cf08c3d1f..078f7cdca6b4b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": null, "tags": [], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.md index 50425cc36a438..be221535f9889 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.md @@ -6,4 +6,5 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.xml index ee6df8928e245..2ebeaf8dfcb4c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_without_class.xml @@ -1,2 +1,2 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.json index fc94cda711153..c6de89ce5cd94 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "description": "This is a class with a doc comment.", "file": null, "tags": [], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.md index 3b8fb8af531ee..132147324bceb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.md @@ -7,4 +7,5 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.xml index 2444a20efb7a8..b4ead6579d5ba 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_1.xml @@ -1,4 +1,4 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.json index 64e1190638a30..7b387fd8683c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.json @@ -7,6 +7,7 @@ "abstract": false, "autowire": false, "autoconfigure": false, + "deprecated": false, "file": null, "tags": [], "usages": [] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.md index 0e50b1cb7a6a1..0526ba117ecaa 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.md @@ -6,4 +6,5 @@ - Abstract: no - Autowired: no - Autoconfigured: no +- Deprecated: no - Usages: none diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.xml index 7a8d9dbe6b177..045787e5c6246 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/existing_class_def_2.xml @@ -1,2 +1,2 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index ee56012d307ca..d546dc2c9cf64 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -69,6 +69,22 @@ public function testPrivateAlias() $this->assertStringContainsString('The "private_alias" service or alias has been removed', $tester->getDisplay()); } + public function testDeprecatedServiceAndAlias() + { + static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); + + $application = new Application(static::$kernel); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + + $tester->run(['command' => 'debug:container', 'name' => 'deprecated', '--format' => 'txt']); + $this->assertStringContainsString('[WARNING] The "deprecated" service is deprecated since foo/bar 1.9 and will be removed in 2.0', $tester->getDisplay()); + + $tester->run(['command' => 'debug:container', 'name' => 'deprecated_alias', '--format' => 'txt']); + $this->assertStringContainsString('[WARNING] The "deprecated_alias" alias is deprecated since foo/bar 1.9 and will be removed in 2.0', $tester->getDisplay()); + } + /** * @dataProvider provideIgnoreBackslashWhenFindingService */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml index 25c1c784298b5..cc1a01bb8f0b5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml @@ -11,6 +11,18 @@ services: private_alias: alias: public public: false + deprecated: + class: Symfony\Bundle\FrameworkBundle\Tests\Fixtures\DeprecatedClass + deprecated: + package: 'foo/bar' + version: '1.9' + message: The "%service_id%" service is deprecated since foo/bar 1.9 and will be removed in 2.0 + deprecated_alias: + alias: deprecated + deprecated: + package: 'foo/bar' + version: '1.9' + message: The "%alias_id%" alias is deprecated since foo/bar 1.9 and will be removed in 2.0 Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BackslashClass: class: Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BackslashClass Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ClassAliasExampleClass: '@public'