Description
Hello there !
I noticed a small bug about service definition in your bundle. If I declare an autowired service from Symfony 3.4, I must set the class
parameter because of the BuildTopicSubscriberRoutesPass
that needs it.
In fact, when autowiring/autoconfiguring services actually works, but the class
value of the definition is set to null
if not explicitly declared.
Here is a small example:
App\Bundle\RestBundle\Processor\GalaxyRecordProcessor:
# class: App\Bundle\RestBundle\Processor\GalaxyRecordProcessor
tags: { name: enqueue.topic_subscriber }
that produces the following error:
In BuildTopicSubscriberRoutesPass.php line 42:
The processor class "" could not be found.
So the CompilerPass
tries to get an empty class because it does not understand that the service name is actually the class. A small fix would be to replace this line:
$processorClass = $processorDefinition->getClass();
by this:
$processorClass = $processorDefinition->getClass() ?? $serviceId;
I'll make a PR as soon as possible (Oh my god ! That docker-compose up -d
is killing me ! :p)
PS: Same thing for BuildCommandSubscriberRoutesPass
by the way ;)
Cheers guys !