Skip to content

Commit c31d044

Browse files
committed
[Workflow] deprecate GuardEvent::getContext method
1 parent 62e115f commit c31d044

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

UPGRADE-6.4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,8 @@ Validator
162162
* Deprecate `ValidatorBuilder::enableAnnotationMapping()`, use `ValidatorBuilder::enableAttributeMapping()` instead
163163
* Deprecate `ValidatorBuilder::disableAnnotationMapping()`, use `ValidatorBuilder::disableAttributeMapping()` instead
164164
* Deprecate `AnnotationLoader`, use `AttributeLoader` instead
165+
166+
Workflow
167+
--------
168+
169+
* The `GuardEvent::getContext` method is deprecated and will be removed in 7.0

src/Symfony/Component/Workflow/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
* Add a profiler
1111
* Add support for multiline descriptions in PlantUML diagrams
1212
* Add PHP attributes to register listeners and guards
13+
* Deprecate `GuardEvent::getContext` method that will be removed in 7.0
1314

1415
6.2
1516
---

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public function __construct(object $subject, Marking $marking, Transition $trans
3232
$this->transitionBlockerList = new TransitionBlockerList();
3333
}
3434

35+
public function getContext(): array
36+
{
37+
@trigger_error(sprintf('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__), \E_USER_DEPRECATED);
38+
39+
return parent::getContext();
40+
}
41+
3542
public function getTransition(): Transition
3643
{
3744
return parent::getTransition();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy