bug #32500 [Debug][DebugClassLoader] Include found files instead of requiring them (fancyweb)
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][DebugClassLoader] Include found files instead of requiring them
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32499
| License | MIT
| Doc PR | no
It fixes https://github.com/symfony/symfony/issues/32499 + it makes the `DebugClassLoader` behaves like composer `ClassLoader` that is very likely the wrapped class loader.
Commits
-------
c7141c82d1
[Debug][DebugClassLoader] Include found files instead of requiring them
This commit is contained in:
commit
91f4752b30
@ -149,11 +149,11 @@ class DebugClassLoader
|
|||||||
if (!$file = $this->classLoader[0]->findFile($class) ?: false) {
|
if (!$file = $this->classLoader[0]->findFile($class) ?: false) {
|
||||||
// no-op
|
// no-op
|
||||||
} elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) {
|
} elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) {
|
||||||
require $file;
|
include $file;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
require $file;
|
include $file;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
\call_user_func($this->classLoader, $class);
|
\call_user_func($this->classLoader, $class);
|
||||||
|
Reference in New Issue
Block a user