Skip to content

[DX][YAML] Improved Deprecation Notices #16748

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

Merged
merged 1 commit into from
Dec 5, 2015
Merged

[DX][YAML] Improved Deprecation Notices #16748

merged 1 commit into from
Dec 5, 2015

Conversation

peterrehm
Copy link
Contributor

Show the actual invalid string for the Yaml deprecations to ease the upgrade as you can grep the strings.

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Related #16745

@weaverryan
Copy link
Member

👍 The YAML errors are indeed quite difficult to find.

@xabbuh
Copy link
Member

xabbuh commented Dec 2, 2015

The ParseException from the Yaml component allows to pass the affected line number and the snippet causing the error (failures will then be shown like [...] at line x (near "foo").). We should use that feature here.

Status: Needs work

@peterrehm
Copy link
Contributor Author

But in Inline::parseScalar I do not have access to the line number. I find the line number not helpful as you do not even know the file, you anyway have to grep for it.

@stof
Copy link
Member

stof commented Dec 2, 2015

@xabbuh The ParseException already contains it in 3.0, as the parser does it with a global try/catch/rethrow

@peterrehm
Copy link
Contributor Author

Okay, so good to go?

@stof
Copy link
Member

stof commented Dec 5, 2015

Please fix the tests

@peterrehm
Copy link
Contributor Author

Updated, buils are pending...

@peterrehm
Copy link
Contributor Author

@stof Tests passed now.

@stof
Copy link
Member

stof commented Dec 5, 2015

Thank you @peterrehm.

@stof stof merged commit 3179407 into symfony:2.8 Dec 5, 2015
stof added a commit that referenced this pull request Dec 5, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

[DX][YAML] Improved Deprecation Notices

Show the actual invalid string for the Yaml deprecations to ease the upgrade as you can grep the strings.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Related #16745

Commits
-------

3179407 Improved error messages for Yaml Deprecations
@peterrehm peterrehm deleted the yaml-deprecations branch December 18, 2015 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants