Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Add workflow with transition constant#4439

Closed
tacman wants to merge 3 commits intodeprecated-packages:mainfrom
tacman:main
Closed

Add workflow with transition constant#4439
tacman wants to merge 3 commits intodeprecated-packages:mainfrom
tacman:main

Conversation

@tacman
Copy link
Copy Markdown
Contributor

@tacman tacman commented Oct 18, 2022

I added workflow.yaml, with the following contents, to address #4436

framework:
    workflows:
        plant:
            supports: [App\Entity\Plant]
            places: [seed, planted]
            transitions:
                !php/const App\Entity\Plant::TRANSITION_PLANT:
                    from: seed
                    to:   planted
-----
<?php

    declare(strict_types=1);

    use App\Entity\Plant;
    use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
    $containerConfigurator->extension('framework', ['workflows' => ['plant' => ['supports' => [Plant::class], 'places' => ['seed', 'planted'], 'transitions' => ['plant' => ['from' => 'seed', 'to' => 'planted']]]]]);
};

@TomasVotruba
Copy link
Copy Markdown
Member

Closing as duplicate of #4440

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants