Updated Rector to commit 6bff51172cf396da8abc062d96f0406fd86ef349

6bff51172c [e2e] Add e2e for polyfill in composer require provided (#5392)
This commit is contained in:
Tomas Votruba 2023-12-26 14:45:38 +00:00
parent a8c5484976
commit 801e9accb8
4 changed files with 18 additions and 10 deletions

View File

@ -1807,12 +1807,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "1cbcfcbdf5576e12e213b493db1a8813d8277c3b"
"reference": "e5120ffbe0a54af5e505f8cd6b405c46b6a55f28"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/1cbcfcbdf5576e12e213b493db1a8813d8277c3b",
"reference": "1cbcfcbdf5576e12e213b493db1a8813d8277c3b",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/e5120ffbe0a54af5e505f8cd6b405c46b6a55f28",
"reference": "e5120ffbe0a54af5e505f8cd6b405c46b6a55f28",
"shasum": ""
},
"require": {
@ -1842,7 +1842,7 @@
"tomasvotruba\/unused-public": "^0.3",
"tracy\/tracy": "^2.10"
},
"time": "2023-12-23T14:25:09+00:00",
"time": "2023-12-26T14:34:09+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1878,12 +1878,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "5f1e96d90c228075cbd9ab5f98f6e1c989ea8547"
"reference": "1f44b34207e14f47c1154cb298633bd70f7cf059"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/5f1e96d90c228075cbd9ab5f98f6e1c989ea8547",
"reference": "5f1e96d90c228075cbd9ab5f98f6e1c989ea8547",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/1f44b34207e14f47c1154cb298633bd70f7cf059",
"reference": "1f44b34207e14f47c1154cb298633bd70f7cf059",
"shasum": ""
},
"require": {
@ -1916,7 +1916,7 @@
"tomasvotruba\/unused-public": "^0.2",
"tracy\/tracy": "^2.10"
},
"time": "2023-12-15T10:10:08+00:00",
"time": "2023-12-26T14:42:36+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 7e78350'), '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 90fbaf5'), '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 1cbcfcb'), '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 5f1e96d'));
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 7e78350'), '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 90fbaf5'), '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 e5120ff'), '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 1f44b34'));
private function __construct()
{
}

View File

@ -8,6 +8,7 @@ use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ObjectType;
use Rector\Core\Rector\AbstractRector;
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@ -106,6 +107,13 @@ CODE_SAMPLE
if (!$expr instanceof MethodCall) {
return null;
}
$varType = $this->nodeTypeResolver->getType($expr->var);
if (!$varType instanceof ObjectType) {
return null;
}
if (!$varType->isInstanceof('Symfony\\Component\\HttpFoundation\\Response')->yes()) {
return null;
}
// must be status method call
if (!$this->isName($expr->name, 'getStatusCode')) {
return null;