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:
Fabien Potencier 2019-07-12 07:52:14 +03:00
commit 91f4752b30
1 changed files with 2 additions and 2 deletions

View File

@ -149,11 +149,11 @@ class DebugClassLoader
if (!$file = $this->classLoader[0]->findFile($class) ?: false) {
// no-op
} elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) {
require $file;
include $file;
return;
} else {
require $file;
include $file;
}
} else {
\call_user_func($this->classLoader, $class);