Skip to content

Commit

Permalink
bug #32500 [Debug][DebugClassLoader] Include found files instead of r…
Browse files Browse the repository at this point in the history
…equiring 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 | #32499
| License       | MIT
| Doc PR        | no

It fixes #32499 + it makes the `DebugClassLoader` behaves like composer `ClassLoader` that is very likely the wrapped class loader.

Commits
-------

c7141c8 [Debug][DebugClassLoader] Include found files instead of requiring them
  • Loading branch information
fabpot committed Jul 12, 2019
2 parents 2846089 + c7141c8 commit 91f4752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Debug/DebugClassLoader.php
Expand Up @@ -149,11 +149,11 @@ public function loadClass($class)
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);
Expand Down

0 comments on commit 91f4752

Please sign in to comment.