Skip to content

Commit de2f220

Browse files
Skip checking return types on PHP <= 7.2
1 parent 044af5a commit de2f220

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
@@ -16,7 +16,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
1616
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
1717
}
1818
}
19-
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70200) {
19+
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70300) {
2020
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
2121
}
2222
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

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

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

0 commit comments

Comments
 (0)