mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 8bce42424e3418ee287fe34b1004b1f66449b923
8bce42424e
[NodeTypeResolver] Move UnionType doc vs FullyQualified native type as not equal to TypeComparator (#5793)
This commit is contained in:
parent
3fdaba944f
commit
36ab30b476
@ -3,10 +3,8 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\DeadCode\PhpDoc;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Param;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
||||
@ -70,9 +68,6 @@ final class DeadParamTagValueNodeAnalyzer
|
||||
if ($paramTagValueNode->description !== '') {
|
||||
return \false;
|
||||
}
|
||||
if ($paramTagValueNode->type instanceof UnionTypeNode && $param->type instanceof FullyQualified) {
|
||||
return \false;
|
||||
}
|
||||
if ($param->type instanceof Name && $this->nodeNameResolver->isName($param->type, 'object')) {
|
||||
return $paramTagValueNode->type instanceof IdentifierTypeNode && (string) $paramTagValueNode->type === 'object';
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '52aa64ffe2cc0add4cbffede6ce36cbec576ef2f';
|
||||
public const PACKAGE_VERSION = '8bce42424e3418ee287fe34b1004b1f66449b923';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-04-03 13:19:32';
|
||||
public const RELEASE_DATE = '2024-04-03 06:34:12';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -3,7 +3,9 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\NodeTypeResolver\TypeComparator;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
@ -102,6 +104,9 @@ final class TypeComparator
|
||||
}
|
||||
public function arePhpParserAndPhpStanPhpDocTypesEqual(Node $phpParserNode, TypeNode $phpStanDocTypeNode, Node $node) : bool
|
||||
{
|
||||
if ($phpStanDocTypeNode instanceof UnionTypeNode && $phpParserNode instanceof FullyQualified) {
|
||||
return \false;
|
||||
}
|
||||
$phpParserNodeType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($phpParserNode);
|
||||
$phpStanDocType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType($phpStanDocTypeNode, $node);
|
||||
if (!$this->areTypesEqual($phpParserNodeType, $phpStanDocType) && $this->isSubtype($phpStanDocType, $phpParserNodeType)) {
|
||||
|
10
vendor/composer/installed.json
vendored
10
vendor/composer/installed.json
vendored
@ -1742,12 +1742,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
||||
"reference": "1fc03517141811339be88a19bc4d2bd860c02a79"
|
||||
"reference": "05e44cfe25504ac9de978b9b977caf207ed0c9e1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/1fc03517141811339be88a19bc4d2bd860c02a79",
|
||||
"reference": "1fc03517141811339be88a19bc4d2bd860c02a79",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/05e44cfe25504ac9de978b9b977caf207ed0c9e1",
|
||||
"reference": "05e44cfe25504ac9de978b9b977caf207ed0c9e1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1760,7 +1760,7 @@
|
||||
"phpunit\/phpunit": "^10.3",
|
||||
"rector\/phpstan-rules": "^0.7.4",
|
||||
"rector\/rector-generator": "^0.7.3",
|
||||
"rector\/rector-src": "dev-clean-up-type-hasher",
|
||||
"rector\/rector-src": "dev-main",
|
||||
"symplify\/easy-coding-standard": "^12.0",
|
||||
"symplify\/phpstan-extensions": "^11.3",
|
||||
"symplify\/phpstan-rules": "^12.4",
|
||||
@ -1769,7 +1769,7 @@
|
||||
"tomasvotruba\/class-leak": "^0.2",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2024-04-03T06:16:44+00:00",
|
||||
"time": "2024-04-03T06:20:55+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
||||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main b3da143'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 1fc0351'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6845db4'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main c8b6413'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main b3da143'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 05e44cf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6845db4'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main c8b6413'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
"phpunit\/phpunit": "^10.3",
|
||||
"rector\/phpstan-rules": "^0.7.4",
|
||||
"rector\/rector-generator": "^0.7.3",
|
||||
"rector\/rector-src": "dev-clean-up-type-hasher",
|
||||
"rector\/rector-src": "dev-main",
|
||||
"symplify\/easy-coding-standard": "^12.0",
|
||||
"symplify\/phpstan-extensions": "^11.3",
|
||||
"symplify\/phpstan-rules": "^12.4",
|
||||
|
Loading…
x
Reference in New Issue
Block a user