OneupUploaderBundle icon indicating copy to clipboard operation
OneupUploaderBundle copied to clipboard

Omitting event name when register event listener not working

Open Wait4Code opened this issue 5 years ago • 5 comments

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 ?

Wait4Code avatar Jan 22 '20 08:01 Wait4Code

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 14 '20 17:04 stale[bot]

Did you test this with the new 3.0.0 release?

bytehead avatar Apr 14 '20 17:04 bytehead

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '20 19:06 stale[bot]

Sorry for the delay but I can confirm that this bug is still present with version 3.0.1.

Wait4Code avatar Jul 09 '20 14:07 Wait4Code

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 07 '20 17:09 stale[bot]