Merge branch '4.4' into 5.2
* 4.4: Skip checking return types on PHP <= 7.2
This commit is contained in:
commit
55ca168ee1
2
phpunit
2
phpunit
|
@ -14,7 +14,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
|
||||||
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
|
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
|
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70300) {
|
||||||
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
|
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
|
||||||
}
|
}
|
||||||
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {
|
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {
|
||||||
|
|
|
@ -611,7 +611,7 @@ class DebugClassLoader
|
||||||
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
|
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === strpos($doc, '@deprecated') && strncmp($ns, $declaringClass, $len)) {
|
if (false === strpos($doc, '* @deprecated') && strncmp($ns, $declaringClass, $len)) {
|
||||||
if ($canAddReturnType && 'docblock' === $this->patchTypes['force'] && false === strpos($method->getFileName(), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) {
|
if ($canAddReturnType && 'docblock' === $this->patchTypes['force'] && false === strpos($method->getFileName(), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) {
|
||||||
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
|
$this->patchMethod($method, $returnType, $declaringFile, $normalizedType);
|
||||||
} elseif ('' !== $declaringClass && $this->patchTypes['deprecations']) {
|
} elseif ('' !== $declaringClass && $this->patchTypes['deprecations']) {
|
||||||
|
|
Reference in New Issue