-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] deprecated usage of @ and ` at the beginning of an unquoted string #16285
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
Conversation
fabpot
commented
Oct 19, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | #16234 |
License | MIT |
Doc PR | n/a |
👍 |
I'm not sure it's worth to remove the I assume there will be ALOT of bundles that are affected that all would not be compatible with 3.0 without adjustments. And adding quotes |
@Tobion we must be as compliant as possible as people use other languages (like Ruby and Python) in their stack. As adding quotes is easy enough and BC for everyone, I think we need to do this now; it's indeed going to be a bit painful but I think it's worth it. |
@@ -4,6 +4,7 @@ CHANGELOG | |||
2.8.0 | |||
----- | |||
|
|||
* Deprecated usage of @ and ` at the beginning of an unquoted string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should escape the backtick here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github seems to handle it just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only as long as you don't add another one in the file. They handle it only because they cannot find the corresponding one.
ping @symfony/deciders |
👍 I agree we should do it now. However, as it will affect almost all bundles and docs out right now it would be nice to provide a rock-solid |
👍 I see another case (the usage of services:
foo.baz:
class: %baz_class% |
@aitboudad Afaik there is nothing special with the Edit: Revoked my +1 because of the failing tests (see below). |
It seems that we have some fixture files that need an update. |
@xabbuh you're right, I tested with |
@aitboudad the reason why we had to quote them in the documentation is because Pygments implemented its Yaml syntax highlighter based on Yaml 1.1, and has not updated it for 1.2. But it is indeed not an issue. |
👍 @dunglas , such |
This PR was squashed before being merged into the 2.3 branch (closes #5843). Discussion ---------- Fixed the YAML syntax for service references | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - See symfony/symfony#16285 and symfony/symfony#16353 for context. I've just found two issues, but it's possible that this syntax is used in more places. Commits ------- daeda56 Fixed the YAML syntax for service references
162f095
to
8df1aa9
Compare
… an unquoted string (fabpot) This PR was merged into the 2.8 branch. Discussion ---------- [Yaml] deprecated usage of @ and ` at the beginning of an unquoted string | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #16234 | License | MIT | Doc PR | n/a Commits ------- 7fee29f [Yaml] deprecated usage of @ and ` at the beginning of an unquoted string
Error Message: The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line Related to pull request: symfony/symfony#16285
Oneliner to change it in all Yaml files: find ./ -name '*.yml' -exec sed -i '' -E 's/([^"])@([a-z\._]+)($|\]| |,)/\1"@\2"\3/g' {} + |
thank you @gepo |
@gepo Thanks for a tip |
This type of use was deprecated in symfony 2.8 and will be dropped in 3.x. Also see: symfony/symfony#16285 PHPBB3-14717
This type of use was deprecated in symfony 2.8 and will be dropped in 3.x. Also see: symfony/symfony#16285 PHPBB3-14717