Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Workflow] BC break after removing workflow.definition tag #32155

Copy link
Copy link
Closed
@nikossvnk

Description

@nikossvnk
Issue body actions

Symfony version(s) affected: 4.3.*

Description
with this change [Workflow] Move code from ValidateWorkflowsPass to the FrameworkExten… · symfony/symfony@a608797 · GitHub workflow services are not tagged anymore with workflow.definition

This causes a BC break in case someone was using this tag to fetch these services during compiler pass.

How to reproduce
For example, in my case I had something like:

class MyStateMachinePass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        foreach ($container->findTaggedServiceIds('workflow.definition') as $id => $service) {
            $workflowDefinition = $container->getDefinition($id);
            $initialState = $workflowDefinition->getArgument(2);

            // do whatever
        }
    }
}

which now is broken

Possible Solution
add again the workflow.definition tag in FrameworkExtension class line 655

            $definitionDefinition->addTag('workflow.definition', [
                'name' => $name,
                'type' => $type,
                'marking_store' => $workflow['marking_store']['type'] ?? null,
            ]);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.