-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] enable DebugClassLoader by default #28412
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
[PhpUnitBridge] enable DebugClassLoader by default #28412
Conversation
@@ -984,8 +984,6 @@ public function setCache(array $options) | |||
* @return $this | |||
* | |||
* @see http://tools.ietf.org/html/rfc2616#section-10.3.5 | |||
* | |||
* @final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is extended in StreamedResponse
, so it cannot be final.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in favor of #28483
@@ -52,6 +53,8 @@ public function __construct(array $mockedNamespaces = array()) | |||
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2; | |||
} | |||
|
|||
$enableDebugClassLoader = \class_exists('Symfony\Component\Debug\DebugClassLoader'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(as a reminder, because we want to use it when testing branch 2.8, the bridge is still compatible with PHP 5.3, so we cannot use ::class
here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great improvement 👍
2aa983e
to
2fb11fc
Compare
…colas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [PhpUnitBridge] enable DebugClassLoader by default | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#10360 With this PR, the phpunit-bridge will enable `DebugClassLoader` by default, making it do its job: throw deprecation notices at autoloading time. On top of #28329, this made me spot some glitches in the code base, fixed here also. This can be disabled by configuring the listener in `phpunit.xml.dist` files, adding `<element key="debug-class-loader"><integer>0</integer></element>` next to `<element key="time-sensitive">...`. Commits ------- 2fb11fc [PhpUnitBridge] enable DebugClassLoader by default
With this PR, the phpunit-bridge will enable
DebugClassLoader
by default, making it do its job: throw deprecation notices at autoloading time. On top of #28329, this made me spot some glitches in the code base, fixed here also.This can be disabled by configuring the listener in
phpunit.xml.dist
files, adding<element key="debug-class-loader"><integer>0</integer></element>
next to<element key="time-sensitive">...
.