Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Regression of YAML !php/const: prefix in Symfony v6.2.0-BETA2 config #48135

Copy link
Copy link
Closed
@guillaumesmo

Description

@guillaumesmo
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.