Updated Rector to commit 827992ae9784abb4a2a5f5f3aecbe52606f3c737

827992ae97 [Performance] [DeadCode] Early check no params in __construct() on RemoveUnusedPromotedPropertyRector (#5672)
This commit is contained in:
Tomas Votruba 2024-02-29 11:39:40 +00:00
parent 42b37a76a2
commit df81c907da
4 changed files with 13 additions and 8 deletions

View File

@ -1866,12 +1866,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "59edb6245e7fbdbe4913c354b6803da3eb7254ac"
"reference": "7aeda0b62b376fed38c1b50e06698e9a2c1a7a5a"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/59edb6245e7fbdbe4913c354b6803da3eb7254ac",
"reference": "59edb6245e7fbdbe4913c354b6803da3eb7254ac",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/7aeda0b62b376fed38c1b50e06698e9a2c1a7a5a",
"reference": "7aeda0b62b376fed38c1b50e06698e9a2c1a7a5a",
"shasum": ""
},
"require": {
@ -1900,7 +1900,7 @@
"tomasvotruba\/class-leak": "^0.2.6",
"tracy\/tracy": "^2.10"
},
"time": "2024-02-12T14:24:35+00:00",
"time": "2024-02-29T11:36:10+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-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a9f411d'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 68e0635'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 1de4618'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 59edb62'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a9f411d'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 68e0635'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 1de4618'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 7aeda0b'));
private function __construct()
{
}

View File

@ -106,16 +106,21 @@ CODE_SAMPLE
/**
* @param ServiceDefinition[] $handlers
*/
private function checkForServices(Class_ $class, array $handlers) : Class_
private function checkForServices(Class_ $class, array $handlers) : ?Class_
{
$hasChanged = \false;
foreach ($handlers as $handler) {
if ($this->isName($class, $handler->getClass() ?? $handler->getId())) {
$options = $this->messengerHelper->extractOptionsFromServiceDefinition($handler);
if (!isset($options['method']) || $options['method'] === '__invoke') {
$this->messengerHelper->addAttribute($class, $options);
$hasChanged = \true;
}
}
}
return $class;
if ($hasChanged) {
return $class;
}
return null;
}
}