Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd468bfd

Browse files
committed
bug#43393 GuardEvent::getTransition() cannot return null (toby-griffiths)
This PR was merged into the 5.4 branch.Discussion----------GuardEvent::getTransition() cannot return null| Q | A| ------------- | ---| Branch? | 5.4?| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets | n/a| License | MIT| Doc PR | n/aSince $transition is required on the constructor, we can type thint that getTransition always return the `Transition`, rather than `Transition|null`.This is a purely annotation change so no change to CHANGELOG or tests, but please let me know if this is desired, or I should target a different branch.I'm also happy to update the other events that are only ever called with with a concrete Transition, if this is acceptable, however I need guidance on whether there's a change these could be called without the Transition in other uses, somehow, or not.Commits-------75bc96d GuardEvent::getTransition() cannot return null
2 parents21528c6 +75bc96d commitd468bfd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/Symfony/Component/Workflow/Event/GuardEvent.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public function __construct(object $subject, Marking $marking, Transition $trans
3535
$this->transitionBlockerList =newTransitionBlockerList();
3636
}
3737

38+
publicfunctiongetTransition():Transition
39+
{
40+
returnparent::getTransition();
41+
}
42+
3843
publicfunctionisBlocked():bool
3944
{
4045
return !$this->transitionBlockerList->isEmpty();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp