Description
Symfony version(s) affected: checked on 3.4.21
Description
Hello,
In an older version of a library I use, there as a compiler pass that uses annotations to automatically tag services whose classes have it. It defines services as having the actual class, but the id
attribute is an incremented integer index starting from 0. This causes the XmlFileLoader to throw an exception due to variable casting.
I know this method of creating services is obsolete, but I am wondering whether not allowing a service with id 0 (which here is anonymous and only used in a collection parameter of another service) should be prohibited. Perhaps the linked condition should strictly check for null
and empty string instead of casting it to a boolean.
None of this is a big issue to me, just thought I would report it.
Additional context
I run into this issue only while performing a debug:container
command, the application itself runs without an exception for some reason.