Hi,
I'm not sure if it is a bug of OneupUploaderBundle or Symfony and even if it is a bug but since Symfony 4.4 we can now register EventListener without specify event name because Symfony will instrospect arguments of listener method to know which event should be associated to listener.
(https://symfony.com/blog/new-in-symfony-4-4-simpler-event-listeners)
This new functionality does not work with, at least, post_upload event.
App\EventListener\MyListener:
tags:
- { name: kernel.event_listener }
use Oneup\UploaderBundle\Event\PostUploadEvent;
final class MyListener
{
public function __invoke(PostUploadEvent $event):void
{
echo "in listener";
exit;
}
}
It seems that with this code, dump is never reached.
Any clue ?
Hi,
I'm not sure if it is a bug of OneupUploaderBundle or Symfony and even if it is a bug but since Symfony 4.4 we can now register EventListener without specify event name because Symfony will instrospect arguments of listener method to know which event should be associated to listener.
(https://symfony.com/blog/new-in-symfony-4-4-simpler-event-listeners)
This new functionality does not work with, at least, post_upload event.
It seems that with this code, dump is never reached.
Any clue ?