Skip to content

Commit 55ca168

Browse files
Merge branch '4.4' into 5.2
* 4.4: Skip checking return types on PHP <= 7.2
2 parents b636e66 + de2f220 commit 55ca168

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

phpunit

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
1414
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
1515
}
1616
}
17-
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
17+
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70300) {
1818
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
1919
}
2020
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
611611
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
612612
}
613613

614-
if (false === strpos($doc, '@deprecated') && strncmp($ns, $declaringClass, $len)) {
614+
if (false === strpos($doc, '* @deprecated') && strncmp($ns, $declaringClass, $len)) {
615615
if ($canAddReturnType && 'docblock' === $this->patchTypes['force'] && false === strpos($method->getFileName(), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) {
616616
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
617617
} elseif ('' !== $declaringClass && $this->patchTypes['deprecations']) {

0 commit comments

Comments
 (0)