Updated Rector to commit b3da981d01f2caa1534033e208a6131c9e61b9c3

b3da981d01 [Renaming] Keep unused import unless configured ->removeUnusedImports() on RenameClassRector on no namespace (#3460)
This commit is contained in:
Tomas Votruba 2023-03-06 20:21:39 +00:00
parent 5059435ef4
commit 3cdd9d3ecb
11 changed files with 67 additions and 42 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 ComposerAutoloaderInit50efb2b9ad73e7195fcbdaa14a542c7d::getLoader();
return ComposerAutoloaderInita3d416d8ea058b46a58d23ee9aa66e42::getLoader();

View File

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

View File

@ -869,17 +869,17 @@
},
{
"name": "phpstan\/phpstan",
"version": "1.10.3",
"version_normalized": "1.10.3.0",
"version": "1.10.4",
"version_normalized": "1.10.4.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
"reference": "5419375b5891add97dc74be71e6c1c34baaddf64"
"reference": "8d39218664b45a4a42d5be66d2b63dcf8c149982"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/5419375b5891add97dc74be71e6c1c34baaddf64",
"reference": "5419375b5891add97dc74be71e6c1c34baaddf64",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/8d39218664b45a4a42d5be66d2b63dcf8c149982",
"reference": "8d39218664b45a4a42d5be66d2b63dcf8c149982",
"shasum": ""
},
"require": {
@ -888,7 +888,7 @@
"conflict": {
"phpstan\/phpstan-shim": "*"
},
"time": "2023-02-25T14:47:13+00:00",
"time": "2023-03-06T13:39:20+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@ -911,7 +911,7 @@
],
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpstan\/issues",
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.10.3"
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.10.4"
},
"funding": [
{
@ -2125,12 +2125,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "c527ff3cfe2a200f65d2f54b12fcbcb98439640a"
"reference": "ee203c96f524f2e1630d1bc45afe5f4bfb176011"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/c527ff3cfe2a200f65d2f54b12fcbcb98439640a",
"reference": "c527ff3cfe2a200f65d2f54b12fcbcb98439640a",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/ee203c96f524f2e1630d1bc45afe5f4bfb176011",
"reference": "ee203c96f524f2e1630d1bc45afe5f4bfb176011",
"shasum": ""
},
"require": {
@ -2146,7 +2146,7 @@
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-generator": "^0.6",
"rector\/rector-src": "dev-main#a10f28873a636995473497c74f34f3bb91d3e829",
"rector\/rector-src": "dev-main",
"symfony\/routing": "^6.1",
"symfony\/security-core": "^6.2",
"symfony\/security-http": "^6.1",
@ -2160,7 +2160,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-03-06T11:27:17+00:00",
"time": "2023-03-06T13:47:33+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmP6H1oACgkQzxoQjQ56
5yCVhxAAlXqhfvKCITSAJjkaIhncEBHpT5Ogby65BX1O5+SkKyc/OO7JnjlN8cLB
DKbJpdc8P2Dbfo/uBHVR5YiNX5CWYzgdMzCpLQI20Ffa7qkeRbA5ZS2AfdIfLqhD
PswlQIYxg0F3lj0L+joTxfBiHgmR5wnOUx1sLXnEbqGtFzzGstPGDg9gjKKh5EnO
g207jrm1we05+k3kKzr233/ENvQD6bBWLr2yngyMoirOuDpurAuPjkBL7vN6PDbx
DlyGDazsgU/R7aE2FtqmFC8KIU/BgnpbCSWTHBEJAqtncHbwTgneyEm+88lT6cUt
YM72Rh1+QTvS3WgJ/q7AQRik2aE83Kz2rc3XOl1ADd45J3Oan1rqQXdnKtH6qZeT
wMk6PE8SQPJ8NMHy3LT048PfMOakAtgBL5xonbVqX0IFAvKAMRijwBCNKat2yRsB
0VGnoeH7klf1fSSo0xOD20Pd0uIILAWZlBjb2e/1NRytFQkokAr1bsLD/VJHiNYh
lPQ4OztCT/uumJOAgTKm10T56CK1u0VxhIVtQ+/NkTvAwrmpX0KKqbYPP/1hZqVO
vFaWJR4iLFNt+il7dlv56jmTAneUrGrWkQdVFbz5FVpqz7abIo+/cevbSSndFZCI
K1mn42aFdYXSqVTFpkzeOQeJPPysEYDysFk7ClhE+F48HN7WAtw=
=A7BG
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmQF7PIACgkQzxoQjQ56
5yAFRA//frPCXthGqDChSiuTqj+6mkh2Dono+yV68DPXcceYH5oSoArnJbxu47a3
2r7p0hg8SCGpx1C9dAbPL+LzU9xnQiI+iscd6hhsFOxrzkwId8N7rExUvZgf1CCO
CKHu7jonEMJyTyD/ZDbg8jivbsu/x4jEsO21+cWyiyNUIst/PVUxlAtiBy4IBCC0
698Nt6S8/xfkPv36HlZbNcnufgJC7wQCTWi1mMvr8RaY+XQ8uh0QKXWYR7wkXd97
yQgQugDVBn+ycvk4akxLVzzME0lYAn09QA0ekon2kt5hDLSBTtkZi1D2hz/N+pz9
jtZ25aZuTHLlgSTn93LzBqxS2Fy8/v5huk6yO3eJGHKlck2Zi/ZViupFBLk7qP8c
6c+L9hiaU0Pa2p0OqwqSd9fUbuphoW9X6IYVzHwJ8m7mcC5/4Z9D8meaxWO8jLkL
KHvK1MybLSvl6R0rYkviGCpkx6ep2ZFQyOKtFkN+6zZLJu94uSas/UOXuEF8TJFe
xpUcTp5QQeexEGQF3PebMAy+4ViXhsvZ89vE/vQKgOCRCtF5YEVlbJCSho1+t141
64E4ooU/OD1yRl3dWeM5ySE+b+xk8obfYmQdaPOtYxFYLOR2KQgxfkAP1IT45yFv
HJaImlfwavV3U53G+Q/bTwa4d3eHhJZz0lgbBAd0+bJExwmFtuE=
=sqgE
-----END PGP SIGNATURE-----

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 5fe59e9'), '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 d4acd90'), '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 dfeb67c'), '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 c527ff3'));
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 5fe59e9'), '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 d4acd90'), '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 dfeb67c'), '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 ee203c9'));
private function __construct()
{
}

View File

@ -16,7 +16,7 @@
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-generator": "^0.6",
"rector\/rector-src": "dev-main#a10f28873a636995473497c74f34f3bb91d3e829",
"rector\/rector-src": "dev-main",
"symfony\/routing": "^6.1",
"symfony\/security-core": "^6.2",
"symfony\/security-http": "^6.1",

View File

@ -1,4 +1,4 @@
# 79 Rules Overview
# 80 Rules Overview
## ActionSuffixRemoverRector
@ -1062,6 +1062,29 @@ Merge removed `@Method` annotation to `@Route` one
<br>
## MessageHandlerInterfaceToAttributeRector
Replaces MessageHandlerInterface with AsMessageHandler attribute
- class: [`Rector\Symfony\Rector\Class_\MessageHandlerInterfaceToAttributeRector`](../src/Rector/Class_/MessageHandlerInterfaceToAttributeRector.php)
```diff
-use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
+use Symfony\Component\Messenger\Attribute\AsMessageHandler;
-class SmsNotificationHandler implements MessageHandlerInterface
+#[AsMessageHandler]
+class SmsNotificationHandler
{
public function __invoke(SmsNotification $message)
{
// ... do some work - like sending an SMS message!
}
}
```
<br>
## OptionNameRector
Turns old option names to new ones in FormTypes in Form in Symfony
@ -1489,7 +1512,7 @@ Change RouteCollectionBuilder to RoutingConfiguratorRector
## ServiceArgsToServiceNamedArgRector
Converts order-dependent arguments `args()` to named arg `arg()`
Converts order-dependent arguments `args()` to named `arg()` call
- class: [`Rector\Symfony\Rector\Closure\ServiceArgsToServiceNamedArgRector`](../src/Rector/Closure/ServiceArgsToServiceNamedArgRector.php)

View File

@ -53,7 +53,7 @@ final class MessageHandlerInterfaceToAttributeRector extends AbstractRector impl
}
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Add Symfony\\Component\\Console\\Attribute\\AsCommand to Symfony Commands and remove the deprecated properties', [new CodeSample(<<<'CODE_SAMPLE'
return new RuleDefinition('Replaces MessageHandlerInterface with AsMessageHandler attribute', [new CodeSample(<<<'CODE_SAMPLE'
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
class SmsNotificationHandler implements MessageHandlerInterface
@ -111,7 +111,9 @@ CODE_SAMPLE
foreach ($handlers as $handler) {
if ($this->isName($class, $handler->getClass() ?? $handler->getId())) {
$options = $this->messengerHelper->extractOptionsFromServiceDefinition($handler);
$this->messengerHelper->addAttribute($class, $options);
if (!isset($options['method']) || $options['method'] === '__invoke') {
$this->messengerHelper->addAttribute($class, $options);
}
}
}
return $class;