Skip to content

Commit 1403112

Browse files
committed
bug #27209 [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead (xkobal)
This PR was squashed before being merged into the 4.1 branch (closes #27209). Discussion ---------- [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #... | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Commits ------- ffa5d1c [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead
2 parents e0f225b + ffa5d1c commit 1403112

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,10 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
573573
foreach ($workflow['supports'] as $supportedClassName) {
574574
$strategyDefinition = new Definition(Workflow\SupportStrategy\InstanceOfSupportStrategy::class, array($supportedClassName));
575575
$strategyDefinition->setPublic(false);
576-
$registryDefinition->addMethodCall('add', array(new Reference($workflowId), $strategyDefinition));
576+
$registryDefinition->addMethodCall('addWorkflow', array(new Reference($workflowId), $strategyDefinition));
577577
}
578578
} elseif (isset($workflow['support_strategy'])) {
579-
$registryDefinition->addMethodCall('add', array(new Reference($workflowId), new Reference($workflow['support_strategy'])));
579+
$registryDefinition->addMethodCall('addWorkflow', array(new Reference($workflowId), new Reference($workflow['support_strategy'])));
580580
}
581581

582582
// Enable the AuditTrail

src/Symfony/Bundle/FrameworkBundle/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"symfony/templating": "~3.4|~4.0",
5252
"symfony/validator": "^4.1",
5353
"symfony/var-dumper": "~3.4|~4.0",
54-
"symfony/workflow": "~3.4|~4.0",
54+
"symfony/workflow": "^4.1",
5555
"symfony/yaml": "~3.4|~4.0",
5656
"symfony/property-info": "~3.4|~4.0",
5757
"symfony/lock": "~3.4|~4.0",
@@ -72,7 +72,7 @@
7272
"symfony/stopwatch": "<3.4",
7373
"symfony/translation": "<3.4",
7474
"symfony/validator": "<4.1",
75-
"symfony/workflow": "<3.4"
75+
"symfony/workflow": "<4.1"
7676
},
7777
"suggest": {
7878
"ext-apcu": "For best performance of the system caches",

0 commit comments

Comments
 (0)