-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[YAML][lint] Can not lint !tagged #28465
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
Comments
If you want to treat YAML files that make use of tags as valid, you will have to also pass the
I am going to close here as this is the expected behaviour. Thank you for understanding. |
@xabbuh indeed its fine, but maybe add it to the documentation then? With a little notice block or similar? |
Not sure if that's the best place to add it. But we can of course discuss that. Would you like to create an issue in the documentation repository? |
Hit this too Possibly the error should be handled, and the error itself tell you that |
see #33651 |
…(xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [Yaml] hint to the --parse-tags when parsing tags fails | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #28465 (comment) | License | MIT | Doc PR | Commits ------- 0121115 hint to the --parse-tags when parsing tags fails
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: 4.1 (possible 3.4, where !tagged got introduced)
Description
If you use
!tagged
in your yaml file, as described under Reference tagged servicesbin/console lint:yaml config
will throwSo the documentation is missing how to set the
Yaml::PARSE_CUSTOM_TAGS
flag, so its possible to actually lint yaml files.How to reproduce
Add
Create a
MyClass
undersrc
In services.yaml add the following
Run
bin/console lint:yaml config
Possible Solution
Always set the
Yaml::PARSE_CUSTOM_TAGS
when usingbin/console lint:yaml
or if without custom tags throws error, then try again but withYaml::PARSE_CUSTOM_TAGS
.Or add a snippet to the documentation, so state how to set
Yaml::PARSE_CUSTOM_TAGS
Additional context
Full exception
The text was updated successfully, but these errors were encountered: