Skip to content

Conversation

acrobat
Copy link
Contributor

@acrobat acrobat commented May 31, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

After updating to symfony 5.1 I've got some deprecations related to the missing package/version attributes/options for deprecated on services.

But currently it's not clear which bundle/part of the code is triggering the deprecations. The only way for me to track down where they were coming from was by setting a xdebug breakpoint in the XmlFileLoader and check the $file variable.

So it seemed like a good idea to include the file path in the deprecation message, that way it will be easier for users to know if their code or a bundle (and which) is triggering this deprecation.

Before:
Screenshot 2020-05-31 at 13 51 03

After:
Screenshot 2020-05-31 at 13 50 10

@fabpot
Copy link
Member

fabpot commented Jun 3, 2020

Thank you @acrobat.

@fabpot fabpot merged commit e778ea6 into symfony:5.1 Jun 3, 2020
@acrobat acrobat deleted the improve-loader-deprecation-message branch June 3, 2020 09:04
@xabbuh xabbuh mentioned this pull request Jun 4, 2020
@fabpot fabpot mentioned this pull request Jun 12, 2020
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.

6 participants