Skip to content

Commit 34640ee

Browse files
[DependencyInjection] Add #[Target] to tell how a dependency is used and hint named autowiring aliases
1 parent 70f1fb3 commit 34640ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Command/DebugAutowiringCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8181
$serviceIds = array_filter($serviceIds, [$this, 'filterToServiceTypes']);
8282

8383
if ($search = $input->getArgument('search')) {
84-
$serviceIds = array_filter($serviceIds, function ($serviceId) use ($search) {
85-
return false !== stripos(str_replace('\\', '', $serviceId), $search) && 0 !== strpos($serviceId, '.');
84+
$searchNormalized = preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', '', $search);
85+
$serviceIds = array_filter($serviceIds, function ($serviceId) use ($searchNormalized) {
86+
return false !== stripos(str_replace('\\', '', $serviceId), $searchNormalized) && 0 !== strpos($serviceId, '.');
8687
});
8788

8889
if (empty($serviceIds)) {

0 commit comments

Comments
 (0)