Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for constants in collection keys in XML config #45708

Closed
@simPod

Description

@simPod

Description

This works with yaml

App\Example:
    calls:
      - method: addOptions
        arguments:
          - key_1: "value_1"
            !php/const App\Example::CONSTANT_1: 'value_0'

I can use constant in a collection entry key. I'd like to use the same with XML config.

Example

Currently I can use constant for value but not a key

<argument type="collection">
    <argument type="constant" key="Symfony\Component\Serializer\Normalizer\DateTimeNormalizer::FORMAT_KEY">DATE_ATOM</argument>
</argument

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