Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Yaml] deprecate starting plain scalars with % characters#17809

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@xabbuh
Copy link
Member

QA
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed ticketssymfony/symfony-docs#6269, symfony/symfony-standard#426
LicenseMIT
Doc PR

}

if ($output &&'%' ===$output[0]) {
@trigger_error(sprintf('Not quoting a scalar starting with the "%s" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.',$output[0]),E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think we need asprintf call here. Why not just using "%"?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You are right. I first thought to deprecate more indicator characters. But it turned out that all other were already handled properly.

@xabbuhxabbuhforce-pushed thedeprecate-unquoted-indicator-chars branch from8031dc2 to1e27787CompareFebruary 15, 2016 17:38
@xabbuh
Copy link
MemberAuthor

Looks like we first need to fix the dumper on lower versions.

$this->assertCount(1,$deprecations);
$this->assertContains('Not quoting a scalar starting with the "%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.',$deprecations[0]);

restore_error_handler();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This won't restore it in case of an assertion failure. This should be placed in atry/finally block (or be done before assertions)

@xabbuhxabbuhforce-pushed thedeprecate-unquoted-indicator-chars branch from1e27787 toba07470CompareFebruary 15, 2016 18:21
fabpot added a commit that referenced this pull requestFeb 16, 2016
This PR was merged into the 2.3 branch.Discussion----------[DependencyInjection] fix dumped YAML snytax| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |see the failing tests in#17809Commits-------30388f1 [DependencyInjection] fix dumped YAML snytax
fabpot added a commit that referenced this pull requestFeb 16, 2016
This PR was merged into the 2.8 branch.Discussion----------[Yaml] always restore the error handler in tests| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#17809 (comment)| License       | MIT| Doc PR        |The error handler must be restored even when assertions failed.Commits-------7631202 [Yaml] always restore the error handler in tests
fabpot added a commit that referenced this pull requestFeb 16, 2016
This PR was merged into the 2.7 branch.Discussion----------[FrameworkBundle] fix YAML syntax| Q             | A| ------------- | ---| Fixed tickets || License       | MITsee failing tests in#17809Commits-------2da4038 [FrameworkBundle] fix YAML syntax
fabpot added a commit that referenced this pull requestFeb 16, 2016
This PR was merged into the 2.3 branch.Discussion----------fix YAML syntax in functional tests config| Q             | A| ------------- | ---| Fixed tickets || License       | MITsee failing tests in#17809Commits-------d9af4bc fix YAML syntax in functional tests config
@fabpot
Copy link
Member

@xabbuh The other PRs have been merged now. Can you merge 2.8 into master and rebase this one?

@xabbuh
Copy link
MemberAuthor

@fabpot Unfortunately, my fix in#17814 broke our test suite when being executed with newer versions of the Yaml component. I think we should fix the test suite for all branches first (see#17816 for the start).

@xabbuhxabbuhforce-pushed thedeprecate-unquoted-indicator-chars branch fromba07470 to7e71786CompareFebruary 17, 2016 07:36
@xabbuh
Copy link
MemberAuthor

Tests finally pass. This is ready to be reviewed.

ping @symfony/deciders

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commite883a4c intosymfony:masterFeb 18, 2016
fabpot added a commit that referenced this pull requestFeb 18, 2016
…ers (xabbuh)This PR was merged into the 3.1-dev branch.Discussion----------[Yaml] deprecate starting plain scalars with % characters| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |symfony/symfony-docs#6269, symfony/symfony-standard#426| License       | MIT| Doc PR        |Commits-------e883a4c deprecate starting plain scalars with % characters
@xabbuhxabbuh deleted the deprecate-unquoted-indicator-chars branchFebruary 18, 2016 10:27
@fabpotfabpot mentioned this pull requestMay 13, 2016
revoltek-daniel added a commit to revoltek-daniel/Evolution7BugsnagBundle that referenced this pull requestAug 8, 2016
Since Symfony 3.1 plain scalars starting with % are deprecated.@seesymfony/symfony#17809
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@xabbuh@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp