Updated Rector to commit ed433a87a3e746547b2a22ece373a4bbebf5823d

ed433a87a3 [TypeDeclaration] Skip assign in if condition on BinaryOpNullableToInstanceofRector (#6629)
This commit is contained in:
Tomas Votruba 2024-12-25 10:59:25 +00:00
parent b24cfd9322
commit 8d4228059d
4 changed files with 8 additions and 7 deletions

View File

@ -1808,12 +1808,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "a4a69edbc895a78a49f53898d2b1f570f791661f"
"reference": "a0f05342957436e4b70cb5b4ec5aa82d5dabd0c0"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/a4a69edbc895a78a49f53898d2b1f570f791661f",
"reference": "a4a69edbc895a78a49f53898d2b1f570f791661f",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/a0f05342957436e4b70cb5b4ec5aa82d5dabd0c0",
"reference": "a0f05342957436e4b70cb5b4ec5aa82d5dabd0c0",
"shasum": ""
},
"require": {
@ -1834,7 +1834,7 @@
"tomasvotruba\/class-leak": "^1.2",
"tracy\/tracy": "^2.10"
},
"time": "2024-12-25T10:32:20+00:00",
"time": "2024-12-25T10:43:21+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -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 f740789'), '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 183795c'), '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 a4a69ed'), '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 29a1abf'));
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 f740789'), '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 183795c'), '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 a0f0534'), '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 29a1abf'));
private function __construct()
{
}

View File

@ -17,6 +17,7 @@ use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use Rector\PHPUnit\NodeAnalyzer\IdentifierManipulator;
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
use Rector\Rector\AbstractRector;
@ -91,7 +92,7 @@ final class AssertEqualsToSameRector extends AbstractRector
}
if ($this->isName($node->name, 'assertEquals')) {
$firstArgType = $this->nodeTypeResolver->getNativeType($args[0]->value);
$secondArgType = $this->nodeTypeResolver->getNativeType($args[1]->value);
$secondArgType = TypeCombinator::removeNull($this->nodeTypeResolver->getNativeType($args[1]->value));
// loose comparison
if ($firstArgType instanceof IntegerType && ($secondArgType instanceof FloatType || $secondArgType instanceof MixedType)) {
return null;