Skip to content

Commit 5b9649f

Browse files
committed
Updated Rector to commit 749a17546633e5ce82c9b4b15ea0cd4d7acb8ec7
rectorphp/rector-src@749a175 feat: Add AddNameToNullArgumentRector (#8000)
1 parent cd04f34 commit 5b9649f

7 files changed

Lines changed: 23 additions & 10 deletions

File tree

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,12 +1803,12 @@
18031803
"source": {
18041804
"type": "git",
18051805
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
1806-
"reference": "29d203fac2612624bbd98203f2b845e51ca690fe"
1806+
"reference": "f279499275e608f5ccc2aac6bd80456c6bb5a1b1"
18071807
},
18081808
"dist": {
18091809
"type": "zip",
1810-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/29d203fac2612624bbd98203f2b845e51ca690fe",
1811-
"reference": "29d203fac2612624bbd98203f2b845e51ca690fe",
1810+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/f279499275e608f5ccc2aac6bd80456c6bb5a1b1",
1811+
"reference": "f279499275e608f5ccc2aac6bd80456c6bb5a1b1",
18121812
"shasum": ""
18131813
},
18141814
"require": {
@@ -1835,7 +1835,7 @@
18351835
"tomasvotruba\/unused-public": "^2.2",
18361836
"tracy\/tracy": "^2.11"
18371837
},
1838-
"time": "2026-05-21T09:09:57+00:00",
1838+
"time": "2026-05-21T10:07:00+00:00",
18391839
"default-branch": true,
18401840
"type": "rector-extension",
18411841
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
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 fb71542'), '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 ccaf2c8'), '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 29d203f'), '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 d9b1d43'));
12+
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 fb71542'), '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 ccaf2c8'), '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 f279499'), '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 d9b1d43'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-phpunit/config/sets/phpunit90.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
namespace RectorPrefix202605;
55

66
use Rector\Config\RectorConfig;
7-
use Rector\PHPUnit\PHPUnit90\Rector\MethodCall\AssertRegExpRector;
87
use Rector\PHPUnit\PHPUnit100\Rector\StmtsAwareInterface\WithConsecutiveRector;
98
use Rector\PHPUnit\PHPUnit90\Rector\Class_\TestListenerToHooksRector;
9+
use Rector\PHPUnit\PHPUnit90\Rector\MethodCall\AssertRegExpRector;
1010
use Rector\PHPUnit\PHPUnit90\Rector\MethodCall\ExplicitPhpErrorApiRector;
1111
use Rector\PHPUnit\PHPUnit90\Rector\MethodCall\SpecificAssertContainsWithoutIdentityRector;
1212
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/ClassMethod/ReplaceTestAnnotationWithPrefixedFunctionRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare (strict_types=1);
44
namespace Rector\PHPUnit\CodeQuality\Rector\ClassMethod;
55

6+
use function in_array;
67
use PhpParser\Comment\Doc;
78
use PhpParser\Node;
89
use PhpParser\Node\Stmt\ClassMethod;
@@ -14,7 +15,6 @@
1415
use Rector\Util\NewLineSplitter;
1516
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
1617
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
17-
use function in_array;
1818
/**
1919
* @see \Rector\PHPUnit\Tests\CodeQuality\Rector\ClassMethod\ReplaceTestAnnotationWithPrefixedFunctionRector\ReplaceTestAnnotationWithPrefixedFunctionRectorTest
2020
*/

vendor/rector/rector-phpunit/rules/PHPUnit120/Rector/Class_/AssertIsTypeMethodCallRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class AssertIsTypeMethodCallRector extends AbstractRector
2929
*/
3030
private TestsNodeAnalyzer $testsNodeAnalyzer;
3131
/**
32-
* @var mixed[]
32+
* @var array<string, string>
3333
*/
3434
private const IS_TYPE_VALUE_TO_METHOD = ['array' => 'isArray', 'bool' => 'isBool', 'boolean' => 'isBool', 'callable' => 'isCallable', 'double' => 'isFloat', 'float' => 'isFloat', 'integer' => 'isInt', 'int' => 'isInt', 'iterable' => 'isIterable', 'null' => 'isNull', 'numeric' => 'isNumeric', 'object' => 'isObject', 'real' => 'isFloat', 'resource' => 'isResource', 'resource (closed)' => 'isClosedResource', 'scalar' => 'isScalar', 'string' => 'isString'];
3535
public function __construct(ValueResolver $valueResolver, TestsNodeAnalyzer $testsNodeAnalyzer)

vendor/rector/rector-phpunit/src/NodeAnalyzer/TestsNodeAnalyzer.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PhpParser\Node\Stmt\ClassMethod;
1010
use PHPStan\Reflection\ClassReflection;
1111
use PHPStan\Type\ObjectType;
12+
use PHPStan\Type\StaticType;
1213
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
1314
use Rector\NodeNameResolver\NodeNameResolver;
1415
use Rector\NodeTypeResolver\NodeTypeResolver;
@@ -101,7 +102,19 @@ public function isPHPUnitMethodCallNames(Node $node, array $names): bool
101102
public function isPHPUnitTestCaseCall(Node $node): bool
102103
{
103104
if ($node instanceof MethodCall) {
104-
return $this->isInTestClass($node);
105+
$callerType = $this->nodeTypeResolver->getType($node->var);
106+
if ($callerType instanceof StaticType) {
107+
$callerType = $callerType->getStaticObjectType();
108+
}
109+
if ($callerType instanceof ObjectType) {
110+
if ($callerType->isInstanceOf(PHPUnitClassName::TEST_CASE)->yes()) {
111+
return \true;
112+
}
113+
if ($callerType->isInstanceOf(PHPUnitClassName::ASSERT)->yes()) {
114+
return \true;
115+
}
116+
}
117+
return \false;
105118
}
106119
if ($node instanceof StaticCall) {
107120
$classType = $this->nodeTypeResolver->getType($node->class);

0 commit comments

Comments
 (0)