Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PhpUnitBridge] weak vendors mode silence legitimate deprecations #21991

Description

@theofidry
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.0 (master)

Not sure if that's the expected behaviour, but say if you have a test requesting a private service, you should get a warning along the lines of:

Requesting the "PrivateFoo" private service is deprecated since Symfony 3.2 and won't be supported anymore in Symfony 4.0

However if you use PhpUnitBridge with weak_vendors mode introduced in #21539, then this deprecation notice will be silenced.

I'm not sure if that's the expected behaviour, my understanding of weak_vendors was that third-party deprecations, as a third-party bundle using a deprecated feature, would be silenced, not any deprecation thrown by Symfony itself triggered or not by your code.


Steps to reproduce:

Inside tests.sh we can see that with weak_vendors, all deprecation notices are caught whereas without it, the deprecation notice for requesting private services is thrown (and is triggered by the user code).

/cc @greg0ire

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions