Skip to content

Commit 276a74d

Browse files
committed
feature #51220 [Workflow] Add a TraceableWorkflow (lyrixx)
This PR was merged into the 6.4 branch. Discussion ---------- [Workflow] Add a `TraceableWorkflow` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | ![image](https://github.com/symfony/symfony/assets/408368/fd6baf45-7b70-452d-beac-d673a8eeef8c) ![image](https://github.com/symfony/symfony/assets/408368/c58d8e00-abf2-4967-a22a-71bde33e3fe2) --- Initially, I wanted to display the current marking on the graph, but it's not possible. "current" does not mean anything. What if I use the workflow for 2 entities? What if I call twice `apply()`. Which marking should I choose? => this is not possible. But, DoctrineBundle use ajax, like for explaining SQL request. It would be nice to be able to click on a marking, and it'll re-render the graph with this marking. WDYT? Commits ------- 963cc7a40da [Worflow] Add a TraceableWorkflow
2 parents 0fb25b7 + 5a768e0 commit 276a74d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

FrameworkBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
use Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass;
7171
use Symfony\Component\VarExporter\Internal\Hydrator;
7272
use Symfony\Component\VarExporter\Internal\Registry;
73+
use Symfony\Component\Workflow\DependencyInjection\WorkflowDebugPass;
7374
use Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass;
7475

7576
// Help opcache.preload discover always-needed symbols
@@ -189,6 +190,7 @@ public function build(ContainerBuilder $container)
189190
$container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);
190191
$container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255);
191192
$container->addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING);
193+
$this->addCompilerPassIfExists($container, WorkflowDebugPass::class);
192194
}
193195
}
194196

0 commit comments

Comments
 (0)