Skip to content

Conversation

@DemonTPx
Copy link
Contributor

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT

I've tried using workflows with an enum, following this article: https://symfony.com/blog/new-in-symfony-7-4-misc-features-part-2#enum-support-in-workflows

The initial_marking configuration did not support it yet with this error:

Invalid type for path "framework.workflows.workflows.comment.initial_marking.0". Expected "scalar", but got "App\Entity\CommentState".

This change seems to fix it!

@carsonbot carsonbot added this to the 7.4 milestone Nov 26, 2025
@carsonbot carsonbot changed the title Allow backed enum to be used in initial_marking workflow configuration Allow backed enum to be used in initial_marking workflow configuration Nov 26, 2025
@DemonTPx DemonTPx changed the title Allow backed enum to be used in initial_marking workflow configuration [FrameworkBundle] Allow backed enum to be used in initial_marking workflow configuration Nov 26, 2025
@nicolas-grekas
Copy link
Member

👍 that'd totally match what's expected for initial_places, since it's possible with the other options. Also what the blog post says works ;)

@nicolas-grekas nicolas-grekas force-pushed the 7.4-workflow-initial-marking-enum branch from 7366a5c to 3fb92ca Compare November 27, 2025 14:35
@nicolas-grekas
Copy link
Member

Thank you @DemonTPx.

@nicolas-grekas nicolas-grekas merged commit 8d2c50c into symfony:7.4 Nov 27, 2025
6 of 12 checks passed
This was referenced Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants