Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f66bed7

Browse filesBrowse files
committed
feature #10506 [Debug] sync with deprecation in DebugClassLoader (nicolas-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
2 parents ad88cdd + c70a468 commit f66bed7
Copy full SHA for f66bed7

File tree

Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed

‎src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,17 @@ private function getClassCandidates($class)
103103
}
104104

105105
// get class loaders wrapped by DebugClassLoader
106-
if ($function[0] instanceof DebugClassLoader && method_exists($function[0], 'getClassLoader')) {
107-
$function[0] = $function[0]->getClassLoader();
106+
if ($function[0] instanceof DebugClassLoader) {
107+
$function = $function[0]->getClassLoader();
108+
109+
// Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated
110+
if (is_object($function)) {
111+
$function = array($function);
112+
}
113+
114+
if (!is_array($function)) {
115+
continue;
116+
}
108117
}
109118

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.