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

[RFC][Yaml] Add custom tags support #21185

Copy link
Copy link
Closed
@GuilhemN

Description

@GuilhemN
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.3.0

Custom tags support is a very important feature imo that currently lacks to the yaml component.
It is basically allowing things like:

services:
    square_printer:
        arguments: [ !color red ]

By having a dedicated system for tags, we could centralize their management and avoid duplication (here and here).
If wanted, it could also be used in the core to remove reserved keys in config files.
For example,

services:
    _defaults:
        autowire: true

    my_service:
        class: FooBar
        arguments:
            - '@service1'
            - =iterator:
                - '@service2'
                - '@service3'

# could become
services:
    !defaults:
        autowire: true

    my_service:
        class: FooBar
        arguments:
            - '@service1'
            - !iterator
                - '@service2'
                - '@service3'

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    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.