Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YAML]  !include tag support #36043

Closed
drzraf opened this issue Mar 12, 2020 · 4 comments
Closed

[YAML]  !include tag support #36043

drzraf opened this issue Mar 12, 2020 · 4 comments

Comments

@drzraf
Copy link

drzraf commented Mar 12, 2020

Description
SymfonyCloud's configuration supports a YAML !include "custom" tag.

It would be useful as part of the YAML component.

Example

tls:
    client_certificate_authorities:
        - !include
            type: string
            path: file1.key
@Doqnach
Copy link

Doqnach commented Mar 16, 2020

See also #30343

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@stof
Copy link
Member

stof commented Feb 19, 2021

I don't think there is anything to do here in the yaml parser. The Symfony Cloud parser is implementing an include feature at its own layer that gets represented with a tag in the yaml (and parsed as TaggedValue), which is how tags are working in the spec.

The yaml spec itself does not have a concept of yaml-controlled includes (which would also require defining a resolution algorithm to find files, while the yaml parser deals with a string input, not with files). And expanding the scope of what yaml is is out of scope of the yaml component.

@drzraf
Copy link
Author

drzraf commented Feb 23, 2021

Fair enough.
Do you know if that ParserExtension's code is already published somewhere so it can be reused?
It may even find its way into another Symfony *bridge* component: It's a useful Yaml extension and I'm pretty sure it's already very generic with few SymfonyCloud's path hardcoded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants