Updated Rector to commit 250bcbbd2f

250bcbbd2f Bump PHPStan to 1.8 (#2588)
This commit is contained in:
Tomas Votruba 2022-06-29 11:05:24 +00:00
parent 6f73a90692
commit f0abc6fd73
10 changed files with 25 additions and 25 deletions

View File

@ -7,7 +7,7 @@
], ],
"require": { "require": {
"php": "^7.2|^8.0", "php": "^7.2|^8.0",
"phpstan/phpstan": "^1.7.12" "phpstan/phpstan": "^1.8"
}, },
"autoload": { "autoload": {
"files": [ "files": [

View File

@ -16,11 +16,11 @@ final class VersionResolver
/** /**
* @var string * @var string
*/ */
public const PACKAGE_VERSION = 'd1807682bf00aeb1cbe87756a897b7ff77bd2bf5'; public const PACKAGE_VERSION = '250bcbbd2fd23f9dcbb697640dd40dee78aadc66';
/** /**
* @var string * @var string
*/ */
public const RELEASE_DATE = '2022-06-29 11:49:52'; public const RELEASE_DATE = '2022-06-29 12:59:47';
/** /**
* @var int * @var int
*/ */

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit7301fc798540fbee6ffb57c04db3a1b6 class ComposerAutoloaderInit34c4a79a48ba7bc185fcae4c98915f19
{ {
private static $loader; private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit7301fc798540fbee6ffb57c04db3a1b6
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit7301fc798540fbee6ffb57c04db3a1b6', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit34c4a79a48ba7bc185fcae4c98915f19', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit7301fc798540fbee6ffb57c04db3a1b6', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit34c4a79a48ba7bc185fcae4c98915f19', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19::getInitializer($loader));
$loader->setClassMapAuthoritative(true); $loader->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6::$files; $includeFiles = \Composer\Autoload\ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19::$files;
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire7301fc798540fbee6ffb57c04db3a1b6($fileIdentifier, $file); composerRequire34c4a79a48ba7bc185fcae4c98915f19($fileIdentifier, $file);
} }
return $loader; return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit7301fc798540fbee6ffb57c04db3a1b6
* @param string $file * @param string $file
* @return void * @return void
*/ */
function composerRequire7301fc798540fbee6ffb57c04db3a1b6($fileIdentifier, $file) function composerRequire34c4a79a48ba7bc185fcae4c98915f19($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6 class ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19
{ {
public static $files = array ( public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3415,9 +3415,9 @@ class ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7301fc798540fbee6ffb57c04db3a1b6::$classMap; $loader->classMap = ComposerStaticInit34c4a79a48ba7bc185fcae4c98915f19::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -2415,12 +2415,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git", "url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "1412f67085e896b095a7f46550aca44a0f6dc352" "reference": "731529ed680266d638d750195df7124f2f5aea87"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/1412f67085e896b095a7f46550aca44a0f6dc352", "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/731529ed680266d638d750195df7124f2f5aea87",
"reference": "1412f67085e896b095a7f46550aca44a0f6dc352", "reference": "731529ed680266d638d750195df7124f2f5aea87",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2449,7 +2449,7 @@
"symplify\/rule-doc-generator": "^11.0", "symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0" "symplify\/vendor-patches": "^11.0"
}, },
"time": "2022-06-28T14:41:10+00:00", "time": "2022-06-29T09:52:16+00:00",
"default-branch": true, "default-branch": true,
"type": "rector-extension", "type": "rector-extension",
"extra": { "extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/ */
final class GeneratedConfig 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 07ea895'), '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 3ed7224'), '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 1a040e3'), '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 cca34de'), '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 6442af0'), '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 b3050c3'), '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 08ce237'), '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 66023de'), '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 1412f67')); 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 07ea895'), '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 3ed7224'), '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 1a040e3'), '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 cca34de'), '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 6442af0'), '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 b3050c3'), '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 08ce237'), '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 66023de'), '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 731529e'));
private function __construct() private function __construct()
{ {
} }

View File

@ -68,13 +68,13 @@ Collect routes from Symfony project router and add Route annotation to controlle
## AuthorizationCheckerIsGrantedExtractorRector ## AuthorizationCheckerIsGrantedExtractorRector
Extract `$this->authorizationChecker->isGranted([$a,` $b]) to `$this->authorizationChecker->isGranted($a)` || `$this->authorizationChecker->isGranted($b)` Change `$this->authorizationChecker->isGranted([$a, $b])` to `$this->authorizationChecker->isGranted($a) || $this->authorizationChecker->isGranted($b)`
- class: [`Rector\Symfony\Rector\MethodCall\AuthorizationCheckerIsGrantedExtractorRector`](../src/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php) - class: [`Rector\Symfony\Rector\MethodCall\AuthorizationCheckerIsGrantedExtractorRector`](../src/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php)
```diff ```diff
-if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) { -if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) {
+if ($this->authorizationChecker->isGranted('ROLE_USER') || $this->authorizationChecker->isGranted('ROLE_USER')) { +if ($this->authorizationChecker->isGranted('ROLE_USER') || $this->authorizationChecker->isGranted('ROLE_ADMIN')) {
} }
``` ```

View File

@ -31,12 +31,12 @@ final class AuthorizationCheckerIsGrantedExtractorRector extends AbstractRector
} }
public function getRuleDefinition() : RuleDefinition public function getRuleDefinition() : RuleDefinition
{ {
return new RuleDefinition('Extract $this->authorizationChecker->isGranted([$a, $b]) to $this->authorizationChecker->isGranted($a) || $this->authorizationChecker->isGranted($b)', [new CodeSample(<<<'CODE_SAMPLE' return new RuleDefinition('Change `$this->authorizationChecker->isGranted([$a, $b])` to `$this->authorizationChecker->isGranted($a) || $this->authorizationChecker->isGranted($b)`', [new CodeSample(<<<'CODE_SAMPLE'
if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) { if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) {
} }
CODE_SAMPLE CODE_SAMPLE
, <<<'CODE_SAMPLE' , <<<'CODE_SAMPLE'
if ($this->authorizationChecker->isGranted('ROLE_USER') || $this->authorizationChecker->isGranted('ROLE_USER')) { if ($this->authorizationChecker->isGranted('ROLE_USER') || $this->authorizationChecker->isGranted('ROLE_ADMIN')) {
} }
CODE_SAMPLE CODE_SAMPLE
)]); )]);