Skip to content

[WebProfilerBundle][DX] Where are the deprecation messages coming from? #31015

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

Conversation

Simperfit
Copy link
Contributor

@Simperfit Simperfit commented Apr 8, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #29876
License MIT
Doc PR none

The test according to this deprecation has been updated accordingly, it seems to be enough to limit the aggregation of message coming from different bundles

@carsonbot carsonbot added Status: Needs Review WebProfilerBundle DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature Deprecation labels Apr 8, 2019
@nicolas-grekas nicolas-grekas changed the title feature: [WebProfilerBundle][DX] Where are the deprecation messages coming from? [WebProfilerBundle][DX] Where are the deprecation messages coming from? Apr 8, 2019
@nicolas-grekas nicolas-grekas added this to the next milestone Apr 8, 2019
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Apr 8, 2019

Tests need to be updated.
Can you please send a screenshot of this when using a bundle that triggers the deprecation (eg using a non-patched version of doctrine-extensions-bundle since that's the one in the linked issue)?

@@ -27,7 +27,7 @@ class TreeBuilder implements NodeParentInterface
public function __construct(string $name = null, string $type = 'array', NodeBuilder $builder = null)
{
if (null === $name) {
@trigger_error('A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.', E_USER_DEPRECATED);
@trigger_error(sprintf('A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0 see %s.', end(explode('/', debug_backtrace()[0]['file']))), 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.

using basename() could fix the failing test think

@Nyholm
Copy link
Member

Nyholm commented Apr 8, 2019

I tested this PR. The result looks like this:

Screenshot 2019-04-08 at 23 55 54

Im not sure it is super helpful to see "Configuration.php" in the deprecation warning.
Im more helped by the trace.

@Simperfit
Copy link
Contributor Author

Simperfit commented Apr 9, 2019 via email

@fabpot
Copy link
Member

fabpot commented Apr 9, 2019

I think #31027 is a better alternative. WDYT?

@nicolas-grekas
Copy link
Member

I agree, thanks for giving it a try!

@Simperfit Simperfit deleted the feature/add-more-context-to-the-deprecation-message branch April 9, 2019 07:37
fabpot added a commit that referenced this pull request Apr 9, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Config] Deprecate TreeBuilder::root

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

Alternative idea to #31015. Or is the `root` method still needed?

It would look like this:

![Screenshot 2019-04-09 01 15 04](https://user-images.githubusercontent.com/330436/55762865-fbd85900-5a64-11e9-9680-0870c85d1c09.png)

Commits
-------

ff6bc79 Deprecate TreeBuilder::root
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature Status: Needs Review WebProfilerBundle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants