Skip to content
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] Remove line number in deprecation notices #23108

Merged
merged 1 commit into from
Jun 9, 2017

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jun 8, 2017

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

While moving an app to 3.3, I noticed that my deprecation log is full of deprecation notices that differ only by some line number, but don't tell which file is concerned.
This makes the line number useless, and just prevents aggregation.

capture du 2017-06-08 16-29-31

@stof
Copy link
Member

stof commented Jun 8, 2017

👍

@@ -237,8 +237,8 @@ private function doParse($value, $flags)
}

if (!(Yaml::PARSE_KEYS_AS_STRINGS & $flags) && !is_string($key)) {
Copy link
Member

Choose a reason for hiding this comment

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

integer keys must be allowed, not only string keys (PHP array support integers). Can you also fix it (there is a PR fixing it currently, but together with other changes and so targetting 3.4)

Copy link
Member Author

Choose a reason for hiding this comment

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

like that?

@fabpot
Copy link
Member

fabpot commented Jun 9, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit f82b618 into symfony:3.3 Jun 9, 2017
fabpot added a commit that referenced this pull request Jun 9, 2017
…grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] Remove line number in deprecation notices

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

While moving an app to 3.3, I noticed that my deprecation log is full of deprecation notices that differ only by some line number, but don't tell which file is concerned.
This makes the line number useless, and just prevents aggregation.

![capture du 2017-06-08 16-29-31](https://user-images.githubusercontent.com/243674/26933795-dd123476-4c67-11e7-8cf3-406bedab9130.png)

Commits
-------

f82b618 [Yaml] Remove line number in deprecation notices
@rvanlaak
Copy link
Contributor

Although I 👍 with the MR, I think the line numbers would be really helpful. Maybe in a more verbose SYMFONY_DEPRECATIONS_HELPER mode? That would require discussion, @nicolas-grekas let me know if you think we should create a separate issue for that?

@nicolas-grekas nicolas-grekas deleted the yaml-aggreg branch June 12, 2017 10:07
@stof
Copy link
Member

stof commented Jun 12, 2017

@rvanlaak SYMFONY_DEPRECATIONS_HELPER does not control the messages triggered in the code itself. It only configures the report in the PHPUnit bridge (and has no effect on the reporting in the profiler and logger btw)

@nicolas-grekas
Copy link
Member Author

An without the file, line numbers are useless...

@fabpot fabpot mentioned this pull request Jul 4, 2017
nicolas-grekas added a commit that referenced this pull request Sep 29, 2017
…ecation (xabbuh)

This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] include file and line number in deprecation

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

In #23108 we removed line numbers from deprecation messages created by the YAML parser because those numbers were quite useless without the file being parsed. I suggest to revert this change and add the file being parsed to the deprecation message.

Commits
-------

cf03552 include file and line number in deprecation
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