diff --git a/src/Symfony/Component/Workflow/CHANGELOG.md b/src/Symfony/Component/Workflow/CHANGELOG.md index 45fcdc8f8208d..2926da4e6428d 100644 --- a/src/Symfony/Component/Workflow/CHANGELOG.md +++ b/src/Symfony/Component/Workflow/CHANGELOG.md @@ -7,7 +7,7 @@ CHANGELOG * Add method `getEnabledTransition()` to `WorkflowInterface` * Automatically register places from transitions * Add support for workflows that need to store many tokens in the marking - * Add method `get()` in event classes to build event names in subscribers + * Add method `getName()` in event classes to build event names in subscribers 7.0 --- diff --git a/src/Symfony/Component/Workflow/Event/AnnounceEvent.php b/src/Symfony/Component/Workflow/Event/AnnounceEvent.php index 56bf306776a0e..0bff3dca9133b 100644 --- a/src/Symfony/Component/Workflow/Event/AnnounceEvent.php +++ b/src/Symfony/Component/Workflow/Event/AnnounceEvent.php @@ -18,7 +18,7 @@ final class AnnounceEvent extends Event { use EventNameTrait { - getNameForTransition as public get; + getNameForTransition as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Event/CompletedEvent.php b/src/Symfony/Component/Workflow/Event/CompletedEvent.php index 38e1bdd9ba6d7..885826f151fd3 100644 --- a/src/Symfony/Component/Workflow/Event/CompletedEvent.php +++ b/src/Symfony/Component/Workflow/Event/CompletedEvent.php @@ -18,7 +18,7 @@ final class CompletedEvent extends Event { use EventNameTrait { - getNameForTransition as public get; + getNameForTransition as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Event/EnterEvent.php b/src/Symfony/Component/Workflow/Event/EnterEvent.php index 84a7050171f10..46e1041352113 100644 --- a/src/Symfony/Component/Workflow/Event/EnterEvent.php +++ b/src/Symfony/Component/Workflow/Event/EnterEvent.php @@ -18,7 +18,7 @@ final class EnterEvent extends Event { use EventNameTrait { - getNameForPlace as public get; + getNameForPlace as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Event/EnteredEvent.php b/src/Symfony/Component/Workflow/Event/EnteredEvent.php index c379065185e14..a71610d751add 100644 --- a/src/Symfony/Component/Workflow/Event/EnteredEvent.php +++ b/src/Symfony/Component/Workflow/Event/EnteredEvent.php @@ -18,7 +18,7 @@ final class EnteredEvent extends Event { use EventNameTrait { - getNameForPlace as public get; + getNameForPlace as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Event/GuardEvent.php b/src/Symfony/Component/Workflow/Event/GuardEvent.php index e4b6a38ac1e79..fbbcf22d00243 100644 --- a/src/Symfony/Component/Workflow/Event/GuardEvent.php +++ b/src/Symfony/Component/Workflow/Event/GuardEvent.php @@ -24,7 +24,7 @@ final class GuardEvent extends Event { use EventNameTrait { - getNameForTransition as public get; + getNameForTransition as public getName; } private TransitionBlockerList $transitionBlockerList; diff --git a/src/Symfony/Component/Workflow/Event/LeaveEvent.php b/src/Symfony/Component/Workflow/Event/LeaveEvent.php index 8246fd98e532e..78fd1b6d472be 100644 --- a/src/Symfony/Component/Workflow/Event/LeaveEvent.php +++ b/src/Symfony/Component/Workflow/Event/LeaveEvent.php @@ -18,7 +18,7 @@ final class LeaveEvent extends Event { use EventNameTrait { - getNameForPlace as public get; + getNameForPlace as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Event/TransitionEvent.php b/src/Symfony/Component/Workflow/Event/TransitionEvent.php index ec994005ea514..a7a3dd06be72d 100644 --- a/src/Symfony/Component/Workflow/Event/TransitionEvent.php +++ b/src/Symfony/Component/Workflow/Event/TransitionEvent.php @@ -18,7 +18,7 @@ final class TransitionEvent extends Event { use EventNameTrait { - getNameForTransition as public get; + getNameForTransition as public getName; } use HasContextTrait; diff --git a/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php b/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php index 2535c13e6ca7c..3c745234a7304 100644 --- a/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php +++ b/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php @@ -29,7 +29,7 @@ class EventNameTraitTest extends TestCase */ public function testEventNames(string $class, ?string $workflowName, ?string $transitionOrPlaceName, string $expected) { - $name = $class::get($workflowName, $transitionOrPlaceName); + $name = $class::getName($workflowName, $transitionOrPlaceName); $this->assertEquals($expected, $name); } @@ -68,6 +68,6 @@ public function testInvalidArgumentExceptionIsThrownIfWorkflowNameIsMissing() { $this->expectException(\InvalidArgumentException::class); - EnterEvent::get(null, 'place'); + EnterEvent::getName(null, 'place'); } }