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

[Debug] DebugClassLoader reports bad deprecation notice #29503

Closed
alekitto opened this issue Dec 7, 2018 · 3 comments
Closed

[Debug] DebugClassLoader reports bad deprecation notice #29503

alekitto opened this issue Dec 7, 2018 · 3 comments

Comments

@alekitto
Copy link
Contributor

alekitto commented Dec 7, 2018

Symfony version(s) affected: 4.2.1

Description
While using PHPUnit 7.5 mocks the DebugClassLoader reports

The "PHPUnit\Framework\MockObject\MockObject" interface extends "PHPUnit_Framework_MockObject_MockObject" that is deprecated Use PHPUnit\Framework\MockObject\MockObject instead.

As you can see, the first interface and one suggested are exactly the same that correctly extends the deprecated interface in order to not break BC.

How to reproduce
Just use a simple $this->createMock in PHPUnit 7.5 test case.

@stof
Copy link
Member

stof commented Dec 11, 2018

yeah, we have a policy of allowing such extension from the same top-level namespace, but it does not work well when migration from PEAR-like namespaces to actual namespaces.

@nicolas-grekas for classes in the global namespaces, should we split on the first _ instead ?

@nicolas-grekas
Copy link
Member

Should be fixed by #29587, please confirm if possible.

@alekitto
Copy link
Contributor Author

Seems working correctly with #29587 applied

nicolas-grekas added a commit that referenced this issue Dec 13, 2018
…ClassLoader (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] ignore underscore vs backslash namespaces in DebugClassLoader

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

Commits
-------

d858dad [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants