In https://github.com/symfony/symfony/pull/18626 we added a new `Yaml::PARSE_CONSTANT` flag to support PHP constants in PHP files.