Skip to content

Commit 9830c64

Browse files
committed
bug #32156 [Workflow] re-add workflow.definition tag to workflow services (nikossvnk)
This PR was squashed before being merged into the 4.3 branch (closes #32156). Discussion ---------- [Workflow] re-add workflow.definition tag to workflow services | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #32155 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | Add again the `workflow.definition` tag in workflow services. Commits ------- 4df2dc5 [Workflow] re-add workflow.definition tag to workflow services
2 parents 67af93f + 4df2dc5 commit 9830c64

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
652652
$definitionDefinition->addArgument($transitions);
653653
$definitionDefinition->addArgument($initialMarking);
654654
$definitionDefinition->addArgument($metadataStoreDefinition);
655+
$definitionDefinition->addTag('workflow.definition', [
656+
'name' => $name,
657+
'type' => $type,
658+
]);
655659

656660
// Create MarkingStore
657661
if (isset($workflow['marking_store']['type'])) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ public function testWorkflowLegacy()
311311
$workflowDefinition->getArgument(0),
312312
'Places are passed to the workflow definition'
313313
);
314+
315+
$this->assertSame(['workflow.definition' => [['name' => 'legacy', 'type' => 'state_machine']]], $workflowDefinition->getTags());
314316
}
315317

316318
/**

0 commit comments

Comments
 (0)