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

what order are hooks of the same type called in? #113

Closed
joachim-n opened this issue Aug 31, 2017 · 2 comments
Closed

what order are hooks of the same type called in? #113

joachim-n opened this issue Aug 31, 2017 · 2 comments

Comments

@joachim-n
Copy link

Is there a defined order for hooks of the same type, eg interact?

In particular, within a single commands class, is it:

  • the order they are defined in the code
  • alphabetical by method name
  • arbitrary?
@greg-1-anderson
Copy link
Member

Arbitrary / undefined. Note that pre-interact and post-interact are available to give some level of ordering. Beyond that, there is no priority level setting for precisely adjusting hook order.

@claudiu-cristea
Copy link

@greg-1-anderson @joachim-n as hooks rely on Symfony event dispatcher, I think it would be a nice new feature to allow passing a priority along with the hook annotation. Maybe @hook post-command cache:rebuild 300?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants