Skip to content

Commit 4f0c5a8

Browse files
committed
[Workflow] Fixed BC break with MarkingStoreInterface::setMarking()
1 parent 18cd342 commit 4f0c5a8

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

UPGRADE-4.3.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,28 @@ Yaml
110110
----
111111

112112
* Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
113+
114+
Workflow
115+
--------
116+
117+
* `MarkingStoreInterface::setMarking()` will have a third argument in Symfony 5.0.
118+
119+
Before:
120+
```php
121+
class MyMarkingStore implements MarkingStoreInterface
122+
{
123+
public function setMarking($subject, Marking $marking)
124+
{
125+
}
126+
}
127+
```
128+
129+
After:
130+
```php
131+
class MyMarkingStore implements MarkingStoreInterface
132+
{
133+
public function setMarking($subject, Marking $marking , array $context = [])
134+
{
135+
}
136+
}
137+
```

UPGRADE-5.0.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Finder
8383

8484
Form
8585
----
86-
86+
8787
* Removed support for using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled.
8888
* Using names for buttons that do not start with a letter, a digit, or an underscore leads to an exception.
8989
* Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons leads to an
@@ -350,6 +350,7 @@ Workflow
350350
* `add` method has been removed use `addWorkflow` method in `Workflow\Registry` instead.
351351
* `SupportStrategyInterface` has been removed, use `WorkflowSupportStrategyInterface` instead.
352352
* `ClassInstanceSupportStrategy` has been removed, use `InstanceOfSupportStrategy` instead.
353+
* `MarkingStoreInterface::setMarking()` has a third argument: `array $context = []`.
353354

354355
Yaml
355356
----

src/Symfony/Component/Workflow/MarkingStore/MarkingStoreInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function getMarking($subject);
3737
* Sets a Marking to a subject.
3838
*
3939
* @param object $subject A subject
40+
* @param array $context Some context
4041
*/
41-
public function setMarking($subject, Marking $marking, array $context = []);
42+
public function setMarking($subject, Marking $marking /*, array $context = []*/);
4243
}

0 commit comments

Comments
 (0)