Closed
Description
Symfony version(s) affected
v6.2.0-BETA2
Description
In Symfony v6.2.0-BETA2, I'm unable to use the YAML !php/const: prefix in doctrine config
Previously, you could do this:
doctrine:
dbal:
options:
!php/const:PDO::MYSQL_ATTR_INIT_COMMAND: SET max_execution_time=60000
In Symfony v6.2.0-BETA2, I get the following error:
Invalid type for path "doctrine.dbal.connections.default.options". Expected "array", but got "Symfony\Component\Yaml\Tag\TaggedValue"
Although there's a simple workaround I wonder if it doesn't affect configuration in other places/cases, which is why I report it
How to reproduce
Add the following config in doctrine.yaml:
doctrine:
dbal:
options:
!php/const:PDO::MYSQL_ATTR_INIT_COMMAND: SET max_execution_time=60000
In Symfony v6.2.0-BETA2, I get the following error:
Invalid type for path "doctrine.dbal.connections.default.options". Expected "array", but got "Symfony\Component\Yaml\Tag\TaggedValue"
Workaround is to use the constant value instead
doctrine:
dbal:
options:
1002: SET max_execution_time=60000
Possible Solution
No response
Additional Context
No response