Skip to content

Commit 2b0cefe

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: Update .github/workflows/tests.yml Don't call class_exists() on null Added and improved Bulgarian translations PHP 8.1 must not cause the build to fail (yet) Add _run_tests bash function Add a GitHub Action for tests against PHP 8.1 [HttpClient] fix adding query string to relative URLs with scoped clients [Security] Added Ukrainian translations
2 parents a3f2273 + 1d7781f commit 2b0cefe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Compiler/CheckTypeDeclarationsPass.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,13 @@ protected function processValue($value, bool $isRoot = false)
8888
return parent::processValue($value, $isRoot);
8989
}
9090

91-
if (!$this->autoload && !class_exists($class = $value->getClass(), false) && !interface_exists($class, false)) {
92-
return parent::processValue($value, $isRoot);
91+
if (!$this->autoload) {
92+
if (!$class = $value->getClass()) {
93+
return parent::processValue($value, $isRoot);
94+
}
95+
if (!class_exists($class, false) && !interface_exists($class, false)) {
96+
return parent::processValue($value, $isRoot);
97+
}
9398
}
9499

95100
if (ServiceLocator::class === $value->getClass()) {

0 commit comments

Comments
 (0)