Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitf66bed7

Browse 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 | noneCommits-------c70a468 [Debug] sync with deprecation in DebugClassLoader
2 parentsad88cdd +c70a468 commitf66bed7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp