File tree 1 file changed +10
-5
lines changed
Filter options
src/Symfony/Bundle/FrameworkBundle/Command 1 file changed +10
-5
lines changed
Original file line number Diff line number Diff line change @@ -161,13 +161,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
161
161
162
162
try {
163
163
$ helper ->describe ($ io , $ object , $ options );
164
+ $ definition = $ object ->hasDefinition ($ options ["id " ])
165
+ ? $ object ->getDefinition ($ options ["id " ])
166
+ : null ;
164
167
165
168
if ('txt ' === $ options ['format ' ] && isset ($ options ['id ' ])) {
166
- if ($ object ->hasDefinition ($ options ['id ' ])) {
167
- $ definition = $ object ->getDefinition ($ options ['id ' ]);
168
- if ($ definition ->isDeprecated ()) {
169
- $ errorIo ->warning ($ definition ->getDeprecation ($ options ['id ' ])['message ' ] ?? sprintf ('The "%s" service is deprecated. ' , $ options ['id ' ]));
170
- }
169
+ if (null !== $ definition && $ definition ->isDeprecated ()) {
170
+ $ errorIo ->warning ($ definition ->getDeprecation ($ options ['id ' ])['message ' ] ?? sprintf ('The "%s" service is deprecated. ' , $ options ['id ' ]));
171
171
}
172
172
if ($ object ->hasAlias ($ options ['id ' ])) {
173
173
$ alias = $ object ->getAlias ($ options ['id ' ]);
@@ -177,6 +177,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
177
177
}
178
178
}
179
179
180
+ if (null !== $ definition && $ definition ->hasTag ("container.excluded " ))
181
+ {
182
+ $ errorIo ->warning (\sprintf ('The "%s" service is excluded from the service container. ' , $ definition ->getClass ()));
183
+ }
184
+
180
185
if (isset ($ options ['id ' ]) && isset ($ kernel ->getContainer ()->getRemovedIds ()[$ options ['id ' ]])) {
181
186
$ errorIo ->note (sprintf ('The "%s" service or alias has been removed or inlined when the container was compiled. ' , $ options ['id ' ]));
182
187
}
You can’t perform that action at this time.
0 commit comments