diff --git a/docs/rector_rules_overview.md b/docs/rector_rules_overview.md index d68eb5ef092..3ce4d5019dc 100644 --- a/docs/rector_rules_overview.md +++ b/docs/rector_rules_overview.md @@ -1,4 +1,4 @@ -# 516 Rules Overview +# 517 Rules Overview
@@ -78,7 +78,7 @@ - [Php80](#php80) (18) -- [Php81](#php81) (8) +- [Php81](#php81) (9) - [PhpSpecToPHPUnit](#phpspectophpunit) (7) @@ -379,7 +379,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { ### AbsolutizeRequireAndIncludePathRector -include/require to absolute path. This Rector might introduce backwards incompatible code, when the include/require being changed depends on the current working directory. +include/require to absolute path. This Rector might introduce backwards incompatible code, when the include/require beeing changed depends on the current working directory. - class: [`Rector\CodeQuality\Rector\Include_\AbsolutizeRequireAndIncludePathRector`](../rules/CodeQuality/Rector/Include_/AbsolutizeRequireAndIncludePathRector.php) @@ -434,7 +434,7 @@ Split 2 assigns ands to separate line ### ArrayKeyExistsTernaryThenValueToCoalescingRector -Change `array_key_exists()` ternary to coalescing +Change `array_key_exists()` ternary to coalesing - class: [`Rector\CodeQuality\Rector\Ternary\ArrayKeyExistsTernaryThenValueToCoalescingRector`](../rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php) @@ -1261,7 +1261,7 @@ Simplify array_search to in_array ### SimplifyBoolIdenticalTrueRector -Simplify bool value compare to true or false +Symplify bool value compare to true or false - class: [`Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector`](../rules/CodeQuality/Rector/Identical/SimplifyBoolIdenticalTrueRector.php) @@ -3349,7 +3349,7 @@ Remove unused parent call with no parent class ### RemovePhpVersionIdCheckRector -Remove unneeded PHP_VERSION_ID check +Remove unneded PHP_VERSION_ID check :wrench: **configure it!** @@ -5513,7 +5513,7 @@ change instanceof Object to is_resource ### DowngradePropertyPromotionRector -Change constructor property promotion to property assign +Change constructor property promotion to property asssign - class: [`Rector\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionRector`](../rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php) @@ -8524,6 +8524,25 @@ Replace property declaration of new state with direct new
+### NullToStrictStringFuncCallArgRector + +Change null to strict string defined function call args + +- class: [`Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector`](../rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php) + +```diff + class SomeClass + { + public function run() + { +- preg_split("#a#", null); ++ preg_split("#a#", ''); + } + } +``` + +
+ ### Php81ResourceReturnToObjectRector Change `is_resource()` to instanceof Object diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 1ac0319865c..bfc5e017dd3 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = '90cb1ad36fac313a61c5154065c82588dcfbccc1'; + public const PACKAGE_VERSION = '4ac5dd64203365def3131ff226f65695a37d1b78'; /** * @var string */ - public const RELEASE_DATE = '2022-01-16 01:38:39'; + public const RELEASE_DATE = '2022-01-16 08:46:29'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20220116\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/vendor/autoload.php b/vendor/autoload.php index 8c6af6088b6..36827c07b1f 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitea010173458446b1008dead1ac5020ac::getLoader(); +return ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 1594cf27efe..2971bbf32ee 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitea010173458446b1008dead1ac5020ac +class ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInitea010173458446b1008dead1ac5020ac return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitea010173458446b1008dead1ac5020ac', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInitea010173458446b1008dead1ac5020ac', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitea010173458446b1008dead1ac5020ac::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,12 +42,12 @@ class ComposerAutoloaderInitea010173458446b1008dead1ac5020ac $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitea010173458446b1008dead1ac5020ac::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireea010173458446b1008dead1ac5020ac($fileIdentifier, $file); + composerRequire45f44610df1bf6e705e2bea6b889fc42($fileIdentifier, $file); } return $loader; @@ -59,7 +59,7 @@ class ComposerAutoloaderInitea010173458446b1008dead1ac5020ac * @param string $file * @return void */ -function composerRequireea010173458446b1008dead1ac5020ac($fileIdentifier, $file) +function composerRequire45f44610df1bf6e705e2bea6b889fc42($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index adc09b5c01e..e7e8bbc1359 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitea010173458446b1008dead1ac5020ac +class ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -3865,9 +3865,9 @@ class ComposerStaticInitea010173458446b1008dead1ac5020ac public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitea010173458446b1008dead1ac5020ac::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitea010173458446b1008dead1ac5020ac::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitea010173458446b1008dead1ac5020ac::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit45f44610df1bf6e705e2bea6b889fc42::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index e62391a3ba7..47176eaedd4 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20220116\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInitea010173458446b1008dead1ac5020ac', false) && !interface_exists('ComposerAutoloaderInitea010173458446b1008dead1ac5020ac', false) && !trait_exists('ComposerAutoloaderInitea010173458446b1008dead1ac5020ac', false)) { - spl_autoload_call('RectorPrefix20220116\ComposerAutoloaderInitea010173458446b1008dead1ac5020ac'); +if (!class_exists('ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42', false) && !interface_exists('ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42', false) && !trait_exists('ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42', false)) { + spl_autoload_call('RectorPrefix20220116\ComposerAutoloaderInit45f44610df1bf6e705e2bea6b889fc42'); } if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { spl_autoload_call('RectorPrefix20220116\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -71,9 +71,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20220116\print_node(...func_get_args()); } } -if (!function_exists('composerRequireea010173458446b1008dead1ac5020ac')) { - function composerRequireea010173458446b1008dead1ac5020ac() { - return \RectorPrefix20220116\composerRequireea010173458446b1008dead1ac5020ac(...func_get_args()); +if (!function_exists('composerRequire45f44610df1bf6e705e2bea6b889fc42')) { + function composerRequire45f44610df1bf6e705e2bea6b889fc42() { + return \RectorPrefix20220116\composerRequire45f44610df1bf6e705e2bea6b889fc42(...func_get_args()); } } if (!function_exists('scanPath')) {