Updated Rector to commit 833ac7279b9fe8ecdc20dbc225f9cc28230ef929

833ac7279b clear
This commit is contained in:
Tomas Votruba 2023-01-15 02:12:00 +00:00
parent bede86547e
commit 2c3af6740f
9 changed files with 32 additions and 23 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '505a2490fab1d61dffe6a9fa0cd95efc35ff9ac0';
public const PACKAGE_VERSION = '833ac7279b9fe8ecdc20dbc225f9cc28230ef929';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-01-15 01:54:36';
public const RELEASE_DATE = '2023-01-15 02:07:45';
/**
* @var int
*/

View File

@ -120,7 +120,7 @@ final class ValueResolver
return null;
}
/**
* @api downgrade symfony
* @api symfony
* @param mixed[] $expectedValues
*/
public function isValues(Expr $expr, array $expectedValues) : bool

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -1913,12 +1913,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "4c1bc82fd09231bc601b2e27183b15d853c5042a"
"reference": "3966deef7984ffc03b35ae37c604a852a5971402"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/4c1bc82fd09231bc601b2e27183b15d853c5042a",
"reference": "4c1bc82fd09231bc601b2e27183b15d853c5042a",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/3966deef7984ffc03b35ae37c604a852a5971402",
"reference": "3966deef7984ffc03b35ae37c604a852a5971402",
"shasum": ""
},
"require": {
@ -1947,7 +1947,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-01-15T01:53:13+00:00",
"time": "2023-01-15T02:05:25+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1977,7 +1977,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\/0.14.2"
"source": "https:\/\/github.com\/rectorphp\/rector-downgrade-php\/tree\/main"
},
"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 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 4c1bc82'), '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 3b132c1'));
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 3966dee'), '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 3b132c1'));
private function __construct()
{
}

View File

@ -72,9 +72,18 @@ final class RegexFuncAnalyzer
if (!$expr->if instanceof Expr) {
return \false;
}
if (!$this->valueResolver->isValues($expr->if, self::REGEX_FUNCTION_NAMES)) {
return \false;
return $this->hasPregMatchFunction($expr);
}
private function hasPregMatchFunction(Ternary $ternary) : bool
{
foreach (self::REGEX_FUNCTION_NAMES as $regexFunctionName) {
if ($ternary->if instanceof Expr && $this->valueResolver->isValue($ternary->if, $regexFunctionName)) {
return \true;
}
if ($this->valueResolver->isValue($ternary->else, $regexFunctionName)) {
return \true;
}
}
return $this->valueResolver->isValues($expr->else, self::REGEX_FUNCTION_NAMES);
return \false;
}
}