Rector 0.17.8

This commit is contained in:
Tomas Votruba 2023-08-03 13:06:37 +00:00
parent 56c4bce010
commit a41439c736
7 changed files with 28 additions and 29 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 ComposerAutoloaderInit2990edc1353c228afb575de79694fcda::getLoader();
return ComposerAutoloaderInita4691cdb946ee6c5f7f44ea2cfafa97a::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit2990edc1353c228afb575de79694fcda
class ComposerAutoloaderInita4691cdb946ee6c5f7f44ea2cfafa97a
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit2990edc1353c228afb575de79694fcda
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit2990edc1353c228afb575de79694fcda', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInita4691cdb946ee6c5f7f44ea2cfafa97a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit2990edc1353c228afb575de79694fcda', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInita4691cdb946ee6c5f7f44ea2cfafa97a', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit2990edc1353c228afb575de79694fcda::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit2990edc1353c228afb575de79694fcda::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a::$files;
$requireFile = \Closure::bind(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 ComposerStaticInit2990edc1353c228afb575de79694fcda
class ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3025,9 +3025,9 @@ class ComposerStaticInit2990edc1353c228afb575de79694fcda
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit2990edc1353c228afb575de79694fcda::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2990edc1353c228afb575de79694fcda::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2990edc1353c228afb575de79694fcda::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita4691cdb946ee6c5f7f44ea2cfafa97a::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1986,12 +1986,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "c3857d1b11ef1edc94c62085c4cab3c4413e5f94"
"reference": "059d48366ee50115006a8d26ede574d70da724d2"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/c3857d1b11ef1edc94c62085c4cab3c4413e5f94",
"reference": "c3857d1b11ef1edc94c62085c4cab3c4413e5f94",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/059d48366ee50115006a8d26ede574d70da724d2",
"reference": "059d48366ee50115006a8d26ede574d70da724d2",
"shasum": ""
},
"require": {
@ -2016,7 +2016,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-08-01T11:13:39+00:00",
"time": "2023-08-03T13:01:47+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2043,7 +2043,7 @@
"description": "Rector downgrade PHP rules",
"support": {
"issues": "https:\/\/github.com\/rectorphp\/rector-downgrade-php\/issues",
"source": "https:\/\/github.com\/rectorphp\/rector-downgrade-php\/tree\/main"
"source": "https:\/\/github.com\/rectorphp\/rector-downgrade-php\/tree\/0.15.1"
},
"install-path": "..\/rector\/rector-downgrade-php"
},

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 1c50ebb'), '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 c3857d1'), '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 0438162'), '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 a0af12a'));
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 1c50ebb'), '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 059d483'), '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 0438162'), '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 a0af12a'));
private function __construct()
{
}

View File

@ -71,18 +71,17 @@ CODE_SAMPLE
return null;
}
$args = $node->getArgs();
if ($args !== []) {
\end($args);
$lastArgumentPosition = \key($args);
$last = $args[$lastArgumentPosition];
if (!$this->followedByCommaAnalyzer->isFollowed($this->file, $last)) {
return null;
}
// remove comma
$last->setAttribute(AttributeKey::FUNC_ARGS_TRAILING_COMMA, \false);
$node->setAttribute(AttributeKey::ORIGINAL_NODE, null);
return $node;
if ($args === []) {
return null;
}
return null;
$lastArgKey = \count($args) - 1;
$lastArg = $args[$lastArgKey];
if (!$this->followedByCommaAnalyzer->isFollowed($this->file, $lastArg)) {
return null;
}
// remove comma
$lastArg->setAttribute(AttributeKey::FUNC_ARGS_TRAILING_COMMA, \false);
$node->setAttribute(AttributeKey::ORIGINAL_NODE, null);
return $node;
}
}