Skip to content

Commit be641d8

Browse files
feature #30075 [DependencyInjection] Added information about deprecated aliases in debug:autowiring (XuruDragon)
This PR was merged into the 4.3-dev branch. Discussion ---------- [DependencyInjection] Added information about deprecated aliases in debug:autowiring | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | n/a Fix and improves a bit PR #29968 and #29995 ![Screenshot](https://i.imgur.com/GDj2NIY.png) Commits ------- 3d2378dab5 [DependencyInjection] Added information about deprecated aliases in debug:autowiring
2 parents 9190051 + 4dc1adb commit be641d8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CHANGELOG
1212
PHP's native `serialize()` and `unserialize()` functions. To use the
1313
original serialization method, set the `framework.messenger.serializer.id`
1414
config option to `messenger.transport.symfony_serializer`.
15+
* Added information about deprecated aliases in `debug:autowiring`
1516

1617
4.2.0
1718
-----

Command/DebugAutowiringCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
104104
$serviceLine = sprintf('<fg=yellow>%s</>', $serviceId);
105105
if ($builder->hasAlias($serviceId)) {
106106
$hasAlias[$serviceId] = true;
107-
$serviceLine .= ' <fg=cyan>('.$builder->getAlias($serviceId).')</>';
107+
$serviceAlias = $builder->getAlias($serviceId);
108+
$serviceLine .= ' <fg=cyan>('.$serviceAlias.')</>';
109+
110+
if ($serviceAlias->isDeprecated()) {
111+
$serviceLine .= ' - <fg=magenta>deprecated</>';
112+
}
108113
} elseif (!$all) {
109114
continue;
110115
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/cache": "~4.3",
2222
"symfony/config": "~4.2",
2323
"symfony/contracts": "^1.0.2",
24-
"symfony/dependency-injection": "^4.2",
24+
"symfony/dependency-injection": "^4.3",
2525
"symfony/event-dispatcher": "^4.1",
2626
"symfony/http-foundation": "^4.3",
2727
"symfony/http-kernel": "^4.2",

0 commit comments

Comments
 (0)