Updated Rector to commit bd68c98f0bc5cb8b41a62dd9e7bd94bf82e731a5

bd68c98f0b Run tests workflow as well on push (#3301)
This commit is contained in:
Tomas Votruba 2023-01-22 13:24:56 +00:00
parent 8c235d2f05
commit 8244a6a0cd
7 changed files with 31 additions and 16 deletions

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit67d8f8d36ea54e58016aa202cecad38a::getLoader();
return ComposerAutoloaderInit7feb3e6e16a61c91a205611517f5ea0e::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit67d8f8d36ea54e58016aa202cecad38a
class ComposerAutoloaderInit7feb3e6e16a61c91a205611517f5ea0e
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit67d8f8d36ea54e58016aa202cecad38a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit67d8f8d36ea54e58016aa202cecad38a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7feb3e6e16a61c91a205611517f5ea0e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit67d8f8d36ea54e58016aa202cecad38a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7feb3e6e16a61c91a205611517f5ea0e', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e::$files;
$requireFile = static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a
class ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3071,9 +3071,9 @@ class ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit67d8f8d36ea54e58016aa202cecad38a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7feb3e6e16a61c91a205611517f5ea0e::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2126,12 +2126,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "d325645194683c4ee2897b0dfc2c744403f428d3"
"reference": "d735f54e87a8b635ea848da898a6226c0efe3948"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/d325645194683c4ee2897b0dfc2c744403f428d3",
"reference": "d325645194683c4ee2897b0dfc2c744403f428d3",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/d735f54e87a8b635ea848da898a6226c0efe3948",
"reference": "d735f54e87a8b635ea848da898a6226c0efe3948",
"shasum": ""
},
"require": {
@ -2165,7 +2165,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-01-22T12:18:25+00:00",
"time": "2023-01-22T13:13:53+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/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c3c11'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main cda9d4d'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2cfc0a5'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d325645'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c3c11'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main cda9d4d'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2cfc0a5'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d735f54'));
private function __construct()
{
}

View File

@ -8,6 +8,7 @@ use PhpParser\Node\Arg;
use PhpParser\Node\Expr\MethodCall;
use Rector\Core\Rector\AbstractRector;
use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer;
use RectorPrefix202301\Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
@ -60,8 +61,22 @@ final class RedirectToRouteRector extends AbstractRector
if (!$this->isName($argumentValue->name, 'generateUrl')) {
return null;
}
if (!$this->isDefaultReferenceType($argumentValue)) {
return null;
}
return $this->nodeFactory->createMethodCall('this', 'redirectToRoute', $this->resolveArguments($node));
}
private function isDefaultReferenceType(MethodCall $methodCall) : bool
{
if (!isset($methodCall->args[2])) {
return \true;
}
$refTypeArg = $methodCall->args[2];
if (!$refTypeArg instanceof Arg) {
return \false;
}
return $this->valueResolver->isValue($refTypeArg->value, UrlGeneratorInterface::ABSOLUTE_PATH);
}
/**
* @return mixed[]
*/