Skip to content

Commit

Permalink
feature #10506 [Debug] sync with deprecation in DebugClassLoader (nic…
Browse files Browse the repository at this point in the history
…olas-grekas)

This PR was merged into the 2.5-dev branch.

Discussion
----------

[Debug] sync with deprecation in DebugClassLoader

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

Commits
-------

c70a468 [Debug] sync with deprecation in DebugClassLoader
  • Loading branch information
fabpot committed Mar 24, 2014
2 parents ad88cdd + c70a468 commit f66bed7
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -103,8 +103,17 @@ private function getClassCandidates($class)
}

// get class loaders wrapped by DebugClassLoader
if ($function[0] instanceof DebugClassLoader && method_exists($function[0], 'getClassLoader')) {
$function[0] = $function[0]->getClassLoader();
if ($function[0] instanceof DebugClassLoader) {
$function = $function[0]->getClassLoader();

// Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated
if (is_object($function)) {
$function = array($function);
}

if (!is_array($function)) {
continue;
}
}

if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) {
Expand Down

0 comments on commit f66bed7

Please sign in to comment.