-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Workflow] Add PHP attributes to register listeners and guards #51210
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
Conversation
164b919 to
1b14718
Compare
src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/Attribute/BuildEventNameTrait.php
Outdated
Show resolved
Hide resolved
1b14718 to
4c12430
Compare
|
@nicolas-grekas Thanks for the review. I addressed your comments |
4c12430 to
7d9bb01
Compare
HeahDude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/Symfony/Component/Workflow/Attribute/BuildEventNameTrait.php
Outdated
Show resolved
Hide resolved
7d9bb01 to
dcc3ce4
Compare
|
Thank you @lyrixx. |
| int $priority = 0, | ||
| string $dispatcher = null, | ||
| ) { | ||
| parent::__construct($this->buildEventName('announce', 'transition', $workflow, $transition), $method, $priority, $dispatcher); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| parent::__construct($this->buildEventName('announce', 'transition', $workflow, $transition), $method, $priority, $dispatcher); | |
| parent::__construct(self::buildEventName('announce', 'transition', $workflow, $transition), $method, $priority, $dispatcher); |
(same for other attributes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static:: then nvm, private method
Allow this:
All theses syntax are supported:
Note: This is not possible to validate the workflow name,nor the transition name, because workflow can be build dynamically