8000
[DIC][DX] Detect case mismatch in autowired service names #25122
Labels
Uh oh!
There was an error while loading. Please reload this page.
Currently when someone misspell service name the message suggesting proper spelling is displayed. However when someone puts a correct service name, but the case doesn't match a generic error message is displayed:
PhpStorm (I don't know about other IDEs) doesn't have case inspection enabled by default, so such error is hard to catch just by looking. I agree autocompletion should be used whenever possible, but such errors still happen for peoples using simple editors.
I suggest improving DX of the
AutowirePass
to contain more detailed error message when service name is correct but case doesn't match. Class loader already behaves like that:symfony/src/Symfony/Component/Debug/DebugClassLoader.php
Line 163 in 4b9ed9e
What do you think?
The text was updated successfully, but these errors were encountered: