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] deprecated usage of @ and ` at the beginning of an unquoted string #16285

Merged
merged 1 commit into from Oct 28, 2015

Conversation

Projects
None yet
10 participants
@fabpot
Member

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
@stof

This comment has been minimized.

Member

stof commented Oct 19, 2015

👍

@Tobion

This comment has been minimized.

Member

Tobion commented Oct 19, 2015

I'm not sure it's worth to remove the @ functionality considering the high impact as said in #16234 (comment)

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 arguments: - "@my_other_service" also doesn't look that nice. So maybe we should only do this change for "`" but live with the fact that @ is not according to spec.

@fabpot

This comment has been minimized.

Member

fabpot commented Oct 19, 2015

@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

This comment has been minimized.

@xabbuh

xabbuh Oct 19, 2015

Member

We should escape the backtick here.

This comment has been minimized.

@fabpot

fabpot Oct 19, 2015

Member

Github seems to handle it just fine.

This comment has been minimized.

@stof

stof Oct 19, 2015

Member

Only as long as you don't add another one in the file. They handle it only because they cannot find the corresponding one.

@fabpot

This comment has been minimized.

Member

fabpot commented Oct 20, 2015

@dunglas

This comment has been minimized.

Member

dunglas commented Oct 20, 2015

👍 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 sed command to do automatically the change in the UPGRADE file.

@aitboudad aitboudad added the Yaml label Oct 20, 2015

@aitboudad

This comment has been minimized.

Contributor

aitboudad commented Oct 20, 2015

👍

I see another case (the usage of % at the beginning of an unquoted string) where I think we should deprecate.

services:
    foo.baz:
        class: %baz_class%
@xabbuh

This comment has been minimized.

Member

xabbuh commented Oct 20, 2015

@aitboudad Afaik there is nothing special with the % character in scalars (there was in YAML 1.1 IIRC though).

Edit: Revoked my +1 because of the failing tests (see below).

@xabbuh

This comment has been minimized.

Member

xabbuh commented Oct 20, 2015

It seems that we have some fixture files that need an update.

@aitboudad

This comment has been minimized.

Contributor

aitboudad commented Oct 20, 2015

@xabbuh you're right, I tested with 1.2

@stof

This comment has been minimized.

Member

stof commented Oct 20, 2015

@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.

@OskarStark

This comment has been minimized.

Contributor

OskarStark commented Oct 22, 2015

👍 @dunglas , such sed command would be great 😄

xabbuh added a commit to symfony/symfony-docs that referenced this pull request Oct 27, 2015

minor #5843 Fixed the YAML syntax for service references (javiereguiluz)
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

@fabpot fabpot force-pushed the fabpot:yaml-deps branch 3 times, most recently from 162f095 to 8df1aa9 Oct 28, 2015

@fabpot fabpot force-pushed the fabpot:yaml-deps branch from 8df1aa9 to 7fee29f Oct 28, 2015

@fabpot fabpot merged commit 7fee29f into symfony:2.8 Oct 28, 2015

1 of 3 checks passed

continuous-integration/appveyor AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Oct 28, 2015

feature #16285 [Yaml] deprecated usage of @ and ` at the beginning of…
… 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

Tobion added a commit that referenced this pull request Oct 28, 2015

minor #16371 [Yaml] escape backtick in markdown changelog (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] escape backtick in markdown changelog

| Q             | A
| ------------- | ---
| Fixed tickets | #16285
| License       | MIT

Commits
-------

a613b0d [Yaml] escape backtick in markdown changelog

@fabpot fabpot referenced this pull request Nov 16, 2015

Merged

Release v2.8.0-BETA1 #16550

pguso added a commit to pguso/LswApiCallerBundle that referenced this pull request Dec 17, 2015

compoatibility to symfony 3.0
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
@gepo

This comment has been minimized.

Contributor

gepo commented Jan 14, 2016

Oneliner to change it in all Yaml files:

find ./ -name '*.yml' -exec sed -i '' -E 's/([^"])@([a-z\._]+)($|\]| |,)/\1"@\2"\3/g' {} +
@OskarStark

This comment has been minimized.

Contributor

OskarStark commented Jan 14, 2016

thank you @gepo

@TomasVotruba

This comment has been minimized.

Contributor

TomasVotruba commented Jan 14, 2016

@gepo Thanks for a tip

@gepo gepo referenced this pull request Jan 14, 2016

Closed

Symfony 3.0 compatibility #166

marc1706 added a commit to marc1706/phpbb that referenced this pull request Jul 23, 2016

[ticket/14717] Quote strings beginning with @ or % in yaml definitions
This type of use was deprecated in symfony 2.8 and will be dropped in 3.x.
Also see: symfony/symfony#16285

PHPBB3-14717

symfony-splitter pushed a commit to phpbb/phpbb-app that referenced this pull request Jul 23, 2016

[ticket/14717] Quote strings beginning with @ or % in yaml definitions
This type of use was deprecated in symfony 2.8 and will be dropped in 3.x.
Also see: symfony/symfony#16285

PHPBB3-14717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment