Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4 |
Just a minor thing: in 4.0 (or 3.4 with strict mode on), we removed the "service auto-registration" functionality of autowiring (i.e. where autowiring would automatically register a service for you if non existed for a class). But, the error message and some related code still exists:
Unless I'm mistaken, this stuff should be removed in 4.0: the error message should not mention anything about auto-registration :). But, it's not as simple as just removing the if statement - in practice, the final error doesn't quite make sense.
To repeat the situation:
-
Type-hint some vendor class (e.g.
MyLib\FooClient
that has a service in the container (e.g.my_lib.foo_client
, but does not have an autowireable alias. -
The error will mention auto-registration. But if you simply remove the last
elseif
, the final message will also not make sense: it should suggest adding an alias fromMyLib\FooClient
tomy_lib.foo_client
.