Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing CI builds on 4.4/5.0/master #35255

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -27,13 +27,15 @@ public static function setUpBeforeClass(): void
continue;
}

$function = $function[0];

// get class loaders wrapped by DebugClassLoader
if ($function[0] instanceof DebugClassLoader) {
$function = $function[0]->getClassLoader();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would debug the actual value here first.. to see if we can understand what happened.

overall the ComposerClassLoader is not a callable/invokable type itself, so i tend to believe we need a 2nd is_array check before accessing $function[0] secondly.

if ($function instanceof DebugClassLoader) {
$function = $function->getClassLoader();
}

if ($function[0] instanceof ComposerClassLoader) {
$function[0]->add('Symfony_Component_ErrorHandler_Tests_Fixtures', \dirname(__DIR__, 5));
if ($function instanceof ComposerClassLoader) {
$function->add('Symfony_Component_ErrorHandler_Tests_Fixtures', \dirname(__DIR__, 5));
break;
}
}
Expand Down