Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omitting event name when register event listener not working #371

Open
Wait4Code opened this issue Jan 22, 2020 · 5 comments
Open

Omitting event name when register event listener not working #371

Wait4Code opened this issue Jan 22, 2020 · 5 comments
Labels
Milestone

Comments

@Wait4Code
Copy link

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 Wait4Code changed the title Omitting event name when registering listener not working Omitting event name when register listener not working Jan 22, 2020
@Wait4Code Wait4Code changed the title Omitting event name when register listener not working Omitting event name when register event listener not working Jan 22, 2020
@bytehead bytehead added the bug label Feb 14, 2020
@stale
Copy link

stale bot commented Apr 14, 2020

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 stale bot added the stale label Apr 14, 2020
@bytehead bytehead removed the stale label Apr 14, 2020
@bytehead
Copy link
Member

Did you test this with the new 3.0.0 release?

@bytehead bytehead removed the bug label Apr 14, 2020
@stale
Copy link

stale bot commented Jun 13, 2020

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 stale bot added the stale label Jun 13, 2020
@stale stale bot closed this as completed Jun 20, 2020
@Wait4Code
Copy link
Author

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

@bytehead bytehead reopened this Jul 9, 2020
@stale stale bot removed the stale label Jul 9, 2020
@bytehead bytehead added the bug label Jul 9, 2020
@bytehead bytehead added this to the 3.x milestone Jul 9, 2020
@stale
Copy link

stale bot commented Sep 7, 2020

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 stale bot added the stale label Sep 7, 2020
@bytehead bytehead removed the stale label Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants