Hot take: I love #Symfony, it's really the best #PHP framework out there (at least, the most powerful), but this obsession with #YAML is just… something. When I read workflows, even sample ones, my brain issues a warning about possible stack overflow 😂
A sample from a blog post about enums in workflows in 7.4:
```
# config/packages/workflow.yaml
framework:
workflows:
blog_publishing:
type: 'workflow'
marking_store:
type: 'method'
property: 'status'
supports:
- App\Entity\BlogPost
initial_marking: !php/enum App\Enumeration\BlogPostStatus::Draft
places: !php/enum App\Enumeration\BlogPostStatus
transitions:
to_review:
from: !php/enum App\Enumeration\BlogPostStatus::Draft
to: !php/enum App\Enumeration\BlogPostStatus::Reviewed
publish:
from: !php/enum App\Enumeration\BlogPostStatus::Reviewed
to: !php/enum App\Enumeration\BlogPostStatus::Published
reject:
from: !php/enum App\Enumeration\BlogPostStatus::Reviewed
to: !php/enum App\Enumeration\BlogPostStatus::Rejected
```
Maybe it's just me, but to me it's extremely hard to read and debug.
A sample from a blog post about enums in workflows in 7.4:
```
# config/packages/workflow.yaml
framework:
workflows:
blog_publishing:
type: 'workflow'
marking_store:
type: 'method'
property: 'status'
supports:
- App\Entity\BlogPost
initial_marking: !php/enum App\Enumeration\BlogPostStatus::Draft
places: !php/enum App\Enumeration\BlogPostStatus
transitions:
to_review:
from: !php/enum App\Enumeration\BlogPostStatus::Draft
to: !php/enum App\Enumeration\BlogPostStatus::Reviewed
publish:
from: !php/enum App\Enumeration\BlogPostStatus::Reviewed
to: !php/enum App\Enumeration\BlogPostStatus::Published
reject:
from: !php/enum App\Enumeration\BlogPostStatus::Reviewed
to: !php/enum App\Enumeration\BlogPostStatus::Rejected
```
Maybe it's just me, but to me it's extremely hard to read and debug.
Ben Ramsey
in reply to André Polykanine • • •André Polykanine
in reply to Ben Ramsey • • •Ben Ramsey
in reply to André Polykanine • • •André Polykanine
in reply to Ben Ramsey • • •I saw a PR about it and even commented. I mean, about workflows in PHP.
Ben Ramsey
in reply to André Polykanine • • •Larry Garfield
in reply to Ben Ramsey • • •André Polykanine
in reply to Larry Garfield • • •Ben Ramsey
in reply to André Polykanine • • •André Polykanine
in reply to Ben Ramsey • • •Ben Ramsey
in reply to André Polykanine • • •André Polykanine
in reply to Ben Ramsey • • •from: !php/enum App\Enumeration\BlogPostStatus::Draft
to: !php/enum App\Enumeration\BlogPostStatus::Reviewed
Ben Ramsey
in reply to André Polykanine • • •Kevin Boyd (he/him) 🇨🇦
in reply to André Polykanine • • •Do you mean this page?
symfony.com/doc/current/workfl…
If so, there is a little button at the top of the example to switch from YAML to PHP.
SymfonyCon Warsaw 2026
SymfonyThe Gregarious Dragon
in reply to André Polykanine • • •André Polykanine
in reply to The Gregarious Dragon • • •Garrett builds web sites
in reply to André Polykanine • • •Agreed. I absolutely *hate* frameworks and other projects that put code in config files like this, and it's something that always turns me away whenever I start think "maybe I should finally learn Symfony" again. And if it must be done, YAML is a particularly poor choice for it: noyaml.com/
My fave Nette does it too (and in its own bespoke config file format no less) but at least it's to a far lesser degree than Symfony and friends do it.
🚨🚨 That's a lot of YAML 🚨🚨
noyaml.comKirill
in reply to André Polykanine • • •André Polykanine
in reply to Kirill • • •Kirill
in reply to André Polykanine • • •Kirill
in reply to André Polykanine • • •FluentValidation — FluentValidation documentation
docs.fluentvalidation.netAndré Polykanine
in reply to Kirill • • •Kirill
in reply to André Polykanine • • •André Polykanine
Unknown parent • • •New in Symfony 7.4: Better PHP Configuration
Javier Eguiluz (Symfony)Ben Ramsey
Unknown parent • • •@hand I’d love to see an example of what this looks like. André mentioned a security config that used fluent interfaces.
Can you point to a config file that shows an example of what you mean?
Do you mean something like this? github.com/mezzio/mezzio-skele…
mezzio-skeleton/config/pipeline.php at 3.18.x · mezzio/mezzio-skeleton
GitHubBen Ramsey
in reply to André Polykanine • • •