mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit a54d7eece452cc28345046b613643495ae5469c7
a54d7eece4
allow to put single class to AnnotationToAttribute
This commit is contained in:
parent
7a32308afd
commit
0c3832254b
@ -77,7 +77,7 @@ class SymfonyRoute
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ANNOTATION_TO_ATTRIBUTE => [new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\\Component\\Routing\\Annotation\\Route', 'Symfony\\Component\\Routing\\Annotation\\Route')]])]);
|
||||
, [self::ANNOTATION_TO_ATTRIBUTE => [new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\\Component\\Routing\\Annotation\\Route')]])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
@ -10,14 +10,14 @@ final class AnnotationToAttribute
|
||||
*/
|
||||
private $tag;
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
private $attributeClass;
|
||||
/**
|
||||
* @param class-string|string $tag
|
||||
* @param class-string $attributeClass
|
||||
*/
|
||||
public function __construct(string $tag, string $attributeClass)
|
||||
public function __construct(string $tag, ?string $attributeClass = null)
|
||||
{
|
||||
$this->tag = $tag;
|
||||
$this->attributeClass = $attributeClass;
|
||||
@ -34,6 +34,9 @@ final class AnnotationToAttribute
|
||||
*/
|
||||
public function getAttributeClass() : string
|
||||
{
|
||||
if ($this->attributeClass === null) {
|
||||
return $this->tag;
|
||||
}
|
||||
return $this->attributeClass;
|
||||
}
|
||||
}
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '1ade2746f69235f369e8a7c5eb0572ce61667563';
|
||||
public const PACKAGE_VERSION = 'a54d7eece452cc28345046b613643495ae5469c7';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-06-05 23:03:43';
|
||||
public const RELEASE_DATE = '2021-06-05 23:17:47';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210605\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc::getLoader();
|
||||
return ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc
|
||||
class ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61', '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\ComposerStaticInit714d57e818885502d2c7d252796e87dc::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit714d57e818885502d2c7d252796e87dc::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire714d57e818885502d2c7d252796e87dc($fileIdentifier, $file);
|
||||
composerRequire5fe0db99979fb2dc5c6277db345a7e61($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire714d57e818885502d2c7d252796e87dc($fileIdentifier, $file)
|
||||
function composerRequire5fe0db99979fb2dc5c6277db345a7e61($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit714d57e818885502d2c7d252796e87dc
|
||||
class ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3872,9 +3872,9 @@ class ComposerStaticInit714d57e818885502d2c7d252796e87dc
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit714d57e818885502d2c7d252796e87dc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit714d57e818885502d2c7d252796e87dc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit714d57e818885502d2c7d252796e87dc::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit5fe0db99979fb2dc5c6277db345a7e61::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -21,8 +21,8 @@ if (!class_exists('SomeTestCase', false) && !interface_exists('SomeTestCase', fa
|
||||
if (!class_exists('CheckoutEntityFactory', false) && !interface_exists('CheckoutEntityFactory', false) && !trait_exists('CheckoutEntityFactory', false)) {
|
||||
spl_autoload_call('RectorPrefix20210605\CheckoutEntityFactory');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc', false) && !interface_exists('ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc', false) && !trait_exists('ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc', false)) {
|
||||
spl_autoload_call('RectorPrefix20210605\ComposerAutoloaderInit714d57e818885502d2c7d252796e87dc');
|
||||
if (!class_exists('ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61', false) && !interface_exists('ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61', false) && !trait_exists('ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61', false)) {
|
||||
spl_autoload_call('RectorPrefix20210605\ComposerAutoloaderInit5fe0db99979fb2dc5c6277db345a7e61');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210605\Doctrine\Inflector\Inflector');
|
||||
@ -3323,9 +3323,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210605\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire714d57e818885502d2c7d252796e87dc')) {
|
||||
function composerRequire714d57e818885502d2c7d252796e87dc() {
|
||||
return \RectorPrefix20210605\composerRequire714d57e818885502d2c7d252796e87dc(...func_get_args());
|
||||
if (!function_exists('composerRequire5fe0db99979fb2dc5c6277db345a7e61')) {
|
||||
function composerRequire5fe0db99979fb2dc5c6277db345a7e61() {
|
||||
return \RectorPrefix20210605\composerRequire5fe0db99979fb2dc5c6277db345a7e61(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user