Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f68d488

Browse files
committed
[FrameworkBundle] Add service deprecation on debug:container command output
1 parent 18809d8 commit f68d488

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ private function getContainerDefinitionData(Definition $definition, bool $omitTa
228228
'abstract' => $definition->isAbstract(),
229229
'autowire' => $definition->isAutowired(),
230230
'autoconfigure' => $definition->isAutoconfigured(),
231+
'deprecated' => $definition->isDeprecated(),
231232
];
232233

233234
if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) {

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
209209
."\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no')
210210
."\n".'- Autowired: '.($definition->isAutowired() ? 'yes' : 'no')
211211
."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no')
212+
."\n".'- Deprecated: '.($definition->isDeprecated() ? 'yes' : 'no')
212213
;
213214

214215
if (isset($options['show_arguments']) && $options['show_arguments']) {

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
305305
$tableRows[] = ['Abstract', $definition->isAbstract() ? 'yes' : 'no'];
306306
$tableRows[] = ['Autowired', $definition->isAutowired() ? 'yes' : 'no'];
307307
$tableRows[] = ['Autoconfigured', $definition->isAutoconfigured() ? 'yes' : 'no'];
308+
$tableRows[] = ['Deprecated', $definition->isDeprecated() ? 'yes' : 'no'];
308309

309310
if ($definition->getFile()) {
310311
$tableRows[] = ['Required File', $definition->getFile() ?: '-'];

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ private function getContainerDefinitionDocument(Definition $definition, string $
341341
$serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false');
342342
$serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false');
343343
$serviceXML->setAttribute('autoconfigured', $definition->isAutoconfigured() ? 'true' : 'false');
344+
$serviceXML->setAttribute('deprecated', $definition->isDeprecated() ? 'true' : 'false');
344345
$serviceXML->setAttribute('file', $definition->getFile() ?? '');
345346

346347
$calls = $definition->getMethodCalls();

0 commit comments

Comments
 (0)