Updated Rector to commit 32165444b1

32165444b1 [Php52] Ensure return  only when node changed on ContinueToBreakInSwitchRector (#2283)
This commit is contained in:
Tomas Votruba 2022-05-11 07:15:27 +00:00
parent 7e928f8b96
commit 9dcd15012f
13 changed files with 79 additions and 28 deletions

View File

@ -66,16 +66,25 @@ CODE_SAMPLE
/**
* @param Switch_ $node
*/
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\Switch_
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Stmt\Switch_
{
$hasChanged = \false;
foreach ($node->cases as $case) {
foreach ($case->stmts as $key => $caseStmt) {
if (!$caseStmt instanceof \PhpParser\Node\Stmt\Continue_) {
continue;
}
$case->stmts[$key] = $this->processContinueStatement($caseStmt);
$newStmt = $this->processContinueStatement($caseStmt);
if ($newStmt === $caseStmt) {
continue;
}
$case->stmts[$key] = $newStmt;
$hasChanged = \true;
}
}
if (!$hasChanged) {
return null;
}
return $node;
}
/**

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '12fa9407f734c847cb7739bd435ec42bc66a8f1c';
public const PACKAGE_VERSION = '32165444b1e0139e9c2245b964f47c584f2795e3';
/**
* @var string
*/
public const RELEASE_DATE = '2022-05-11 08:06:19';
public const RELEASE_DATE = '2022-05-11 07:07:42';
/**
* @var string
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b
class ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiref4d3d73b2d810c5eea9f754f08f9876b($fileIdentifier, $file);
composerRequire143d53f0d8e2ed4339842b47328cd4d4($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b
* @param string $file
* @return void
*/
function composerRequiref4d3d73b2d810c5eea9f754f08f9876b($fileIdentifier, $file)
function composerRequire143d53f0d8e2ed4339842b47328cd4d4($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 ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b
class ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3889,9 +3889,9 @@ class ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf4d3d73b2d810c5eea9f754f08f9876b::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit143d53f0d8e2ed4339842b47328cd4d4::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2784,12 +2784,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/sabbelasichon\/typo3-rector.git",
"reference": "0da9d196fe20e6d377236f038c6203db31ad3d67"
"reference": "7d524c8e6004b1300d2a0ea55ec917ae33ec5900"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/0da9d196fe20e6d377236f038c6203db31ad3d67",
"reference": "0da9d196fe20e6d377236f038c6203db31ad3d67",
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/7d524c8e6004b1300d2a0ea55ec917ae33ec5900",
"reference": "7d524c8e6004b1300d2a0ea55ec917ae33ec5900",
"shasum": ""
},
"require": {
@ -2819,7 +2819,7 @@
"symplify\/vendor-patches": "^10.2",
"tracy\/tracy": "^2.8"
},
"time": "2022-05-11T03:55:23+00:00",
"time": "2022-05-11T06:44:15+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-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 43ca394'), '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 77c17ba'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 784271e'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 352a13b'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e048bfd'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e544f2a'), '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 666c8d7'), '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 642ada3'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 0da9d19'));
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 43ca394'), '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 77c17ba'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 784271e'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 352a13b'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e048bfd'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e544f2a'), '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 666c8d7'), '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 642ada3'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 7d524c8'));
private function __construct()
{
}

View File

@ -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('RectorPrefix20220511\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b', false) && !interface_exists('ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b', false) && !trait_exists('ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b', false)) {
spl_autoload_call('RectorPrefix20220511\ComposerAutoloaderInitf4d3d73b2d810c5eea9f754f08f9876b');
if (!class_exists('ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4', false) && !interface_exists('ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4', false) && !trait_exists('ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4', false)) {
spl_autoload_call('RectorPrefix20220511\ComposerAutoloaderInit143d53f0d8e2ed4339842b47328cd4d4');
}
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('RectorPrefix20220511\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220511\print_node(...func_get_args());
}
}
if (!function_exists('composerRequiref4d3d73b2d810c5eea9f754f08f9876b')) {
function composerRequiref4d3d73b2d810c5eea9f754f08f9876b() {
return \RectorPrefix20220511\composerRequiref4d3d73b2d810c5eea9f754f08f9876b(...func_get_args());
if (!function_exists('composerRequire143d53f0d8e2ed4339842b47328cd4d4')) {
function composerRequire143d53f0d8e2ed4339842b47328cd4d4() {
return \RectorPrefix20220511\composerRequire143d53f0d8e2ed4339842b47328cd4d4(...func_get_args());
}
}
if (!function_exists('scanPath')) {

View File

@ -0,0 +1,18 @@
<?php
declare (strict_types=1);
namespace RectorPrefix20220511;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
return ['TYPO3\\CMS\\Backend\\Form\\Element\\InputLinkElement' => \RectorPrefix20220511\TYPO3\CMS\Backend\Form\Element\LinkElement::class, 'TYPO3\\CMS\\Backend\\Form\\Element\\InputDateTimeElement' => \RectorPrefix20220511\TYPO3\CMS\Backend\Form\Element\DatetimeElement::class, 'TYPO3\\CMS\\Backend\\Form\\Element\\InputColorPickerElement' => \RectorPrefix20220511\TYPO3\CMS\Backend\Form\Element\ColorElement::class];

View File

@ -0,0 +1,18 @@
<?php
declare (strict_types=1);
namespace RectorPrefix20220511;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
return ['TYPO3\\CMS\\Frontend\\Service\\TypoLinkCodecService' => \RectorPrefix20220511\TYPO3\CMS\Core\LinkHandling\TypoLinkCodecService::class];

View File

@ -4,8 +4,10 @@ declare (strict_types=1);
namespace RectorPrefix20220511;
use Rector\Config\RectorConfig;
use Ssch\TYPO3Rector\Rector\Migrations\RenameClassMapAliasRector;
use Ssch\TYPO3Rector\Rector\v12\v0\MigrateInternalTypeRector;
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
$rectorConfig->import(__DIR__ . '/../config.php');
$rectorConfig->rule(\Ssch\TYPO3Rector\Rector\v12\v0\MigrateInternalTypeRector::class);
$rectorConfig->ruleWithConfiguration(\Ssch\TYPO3Rector\Rector\Migrations\RenameClassMapAliasRector::class, [__DIR__ . '/../../Migrations/TYPO3/12.0/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php', __DIR__ . '/../../Migrations/TYPO3/12.0/typo3/sysext/frontend/Migrations/Code/ClassAliasMap.php']);
};

View File

@ -110,7 +110,11 @@ Those need to be provided via `extra` section inside `composer.json` of the proj
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/9.5/typo3/sysext/recordlist/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/9.5/typo3/sysext/reports/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/9.5/typo3/sysext/t3editor/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/9.5/typo3/sysext/workspaces/Migrations/Code/ClassAliasMap.php"
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/9.5/typo3/sysext/workspaces/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/10.4/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/10.4/typo3/sysext/core/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/12.0/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php",
"vendor/rector/rector/vendor/ssch/typo3-rector/Migrations/TYPO3/12.0/typo3/sysext/frontend/Migrations/Code/ClassAliasMap.php"
]
}
}