Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Workflow] Remove GuardEvent::getContext() method without replacement #51549

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

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Symfony/Component/Workflow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CHANGELOG

* Require explicit argument when calling `Definition::setInitialPlaces()`
* `GuardEvent::getContext()` method has been removed. Method was not supposed to be called within guard event listeners as it always returned an empty array anyway.
* Remove `GuardEvent::getContext()` method without replacement

6.4
---
Expand Down
7 changes: 0 additions & 7 deletions src/Symfony/Component/Workflow/Event/GuardEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ public function __construct(object $subject, Marking $marking, Transition $trans
$this->transitionBlockerList = new TransitionBlockerList();
}

public function getContext(): array
{
trigger_deprecation('symfony/workflow', '6.4', 'The %s::getContext() method is deprecated and will be removed in 7.0. You should no longer call this method as it always returns an empty array when invoked within a guard listener.', __CLASS__);

return parent::getContext();
}

public function getTransition(): Transition
{
return parent::getTransition();
Expand Down