Updated Rector to commit 10c7bc6a4114dddde311e49efcd9c441ea92babc

10c7bc6a41 [Performance][Php81] Ensure check readonly on param only on __construct() method (#5693)
This commit is contained in:
Tomas Votruba 2024-03-05 13:39:29 +00:00
parent daa84a6ddf
commit ff1845ce1a
4 changed files with 13 additions and 7 deletions

View File

@ -1802,12 +1802,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git", "url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "56820f6304464e7ac5da539b69fa649d24b1aa4c" "reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/56820f6304464e7ac5da539b69fa649d24b1aa4c", "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
"reference": "56820f6304464e7ac5da539b69fa649d24b1aa4c", "reference": "e065c40ada5c10d6e6b2a1de4e870de84c0de8f6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1830,7 +1830,7 @@
"tomasvotruba\/class-leak": "^0.2", "tomasvotruba\/class-leak": "^0.2",
"tracy\/tracy": "^2.10" "tracy\/tracy": "^2.10"
}, },
"time": "2024-03-01T17:33:58+00:00", "time": "2024-03-05T13:36:33+00:00",
"default-branch": true, "default-branch": true,
"type": "rector-extension", "type": "rector-extension",
"extra": { "extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/ */
final class GeneratedConfig 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 0df09cf'), '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 68e0635'), '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 56820f6'), '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 ee8ef7f')); 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 0df09cf'), '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 68e0635'), '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 e065c40'), '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 ee8ef7f'));
private function __construct() private function __construct()
{ {
} }

View File

@ -78,7 +78,13 @@ CODE_SAMPLE
if (!$this->isNames($node->name, ['assertNotEmpty', 'assertEmpty'])) { if (!$this->isNames($node->name, ['assertNotEmpty', 'assertEmpty'])) {
return null; return null;
} }
$firstArg = $node->getArgs()[0]; if ($node->isFirstClassCallable()) {
return null;
}
$firstArg = $node->getArgs()[0] ?? null;
if (!$firstArg instanceof Arg) {
return null;
}
$firstArgType = $this->getType($firstArg->value); $firstArgType = $this->getType($firstArg->value);
if (!$firstArgType instanceof UnionType) { if (!$firstArgType instanceof UnionType) {
return null; return null;