mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-28 23:10:51 +00:00
Rector 0.15.10
This commit is contained in:
parent
39a38b4fc5
commit
000bfb6f79
|
@ -19,7 +19,7 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0.15.9';
|
||||
public const PACKAGE_VERSION = '0.15.10';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc::getLoader();
|
||||
return ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08::getLoader();
|
||||
|
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc
|
||||
class ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08::$files;
|
||||
$requireFile = static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc
|
||||
class ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3070,9 +3070,9 @@ class ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
|
@ -1914,12 +1914,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
||||
"reference": "0c14a4252f0e16c5edd1428ae59d873fd430d605"
|
||||
"reference": "cda9d4d04cf31f229fdcb96e63573957d7612f3e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/0c14a4252f0e16c5edd1428ae59d873fd430d605",
|
||||
"reference": "0c14a4252f0e16c5edd1428ae59d873fd430d605",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/cda9d4d04cf31f229fdcb96e63573957d7612f3e",
|
||||
"reference": "cda9d4d04cf31f229fdcb96e63573957d7612f3e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1948,7 +1948,7 @@
|
|||
"tomasvotruba\/type-coverage": "^0.0.9",
|
||||
"tomasvotruba\/unused-public": "^0.0.34"
|
||||
},
|
||||
"time": "2023-01-21T14:12:03+00:00",
|
||||
"time": "2023-01-21T14:25:10+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
1
vendor/nette/utils/src/Iterators/Mapper.php
vendored
1
vendor/nette/utils/src/Iterators/Mapper.php
vendored
|
@ -19,6 +19,7 @@ class Mapper extends \IteratorIterator
|
|||
parent::__construct($iterator);
|
||||
$this->callback = $callback;
|
||||
}
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return ($this->callback)(parent::current(), parent::key());
|
||||
|
|
1
vendor/nette/utils/src/Utils/ArrayHash.php
vendored
1
vendor/nette/utils/src/Utils/ArrayHash.php
vendored
|
@ -60,6 +60,7 @@ class ArrayHash extends \stdClass implements \ArrayAccess, \Countable, \Iterator
|
|||
* @param string|int $key
|
||||
* @return T
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($key)
|
||||
{
|
||||
return $this->{$key};
|
||||
|
|
1
vendor/nette/utils/src/Utils/ArrayList.php
vendored
1
vendor/nette/utils/src/Utils/ArrayList.php
vendored
|
@ -68,6 +68,7 @@ class ArrayList implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||
* @return T
|
||||
* @throws Nette\OutOfRangeException
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($index)
|
||||
{
|
||||
if (!\is_int($index) || $index < 0 || $index >= \count($this->list)) {
|
||||
|
|
1
vendor/nette/utils/src/Utils/DateTime.php
vendored
1
vendor/nette/utils/src/Utils/DateTime.php
vendored
|
@ -66,6 +66,7 @@ class DateTime extends \DateTime implements \JsonSerializable
|
|||
* @param string|\DateTimeZone $timezone (default timezone is used if null is passed)
|
||||
* @return static|false
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public static function createFromFormat($format, $time, $timezone = null)
|
||||
{
|
||||
if ($timezone === null) {
|
||||
|
|
1
vendor/nette/utils/src/Utils/Html.php
vendored
1
vendor/nette/utils/src/Utils/Html.php
vendored
|
@ -577,6 +577,7 @@ class Html implements \ArrayAccess, \Countable, \IteratorAggregate, HtmlStringab
|
|||
* @param int $index
|
||||
* @return HtmlStringable|string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public final function offsetGet($index)
|
||||
{
|
||||
return $this->children[$index];
|
||||
|
|
|
@ -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 f0c3c11'), '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 0c14a42'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), '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 2cfc0a5'), '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 65d1307'));
|
||||
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 f0c3c11'), '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 cda9d4d'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), '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 2cfc0a5'), '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 65d1307'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ use RectorPrefix202301\Webmozart\Assert\Assert;
|
|||
*/
|
||||
final class DowngradeAttributeToAnnotationRector extends AbstractRector implements ConfigurableRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private const SKIPPED_ATTRIBUTES = ['Attribute', 'ReturnTypeWillChange'];
|
||||
/**
|
||||
* @var DowngradeAttributeToAnnotation[]
|
||||
*/
|
||||
|
@ -88,6 +92,9 @@ CODE_SAMPLE
|
|||
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
|
||||
foreach ($node->attrGroups as $attrGroup) {
|
||||
foreach ($attrGroup->attrs as $key => $attribute) {
|
||||
if ($this->shouldSkipAttribute($attribute)) {
|
||||
continue;
|
||||
}
|
||||
$attributeToAnnotation = $this->matchAttributeToAnnotation($attribute, $this->attributesToAnnotations);
|
||||
if (!$attributeToAnnotation instanceof DowngradeAttributeToAnnotation) {
|
||||
// clear the attribute to avoid inlining to a comment that will ignore the rest of the line
|
||||
|
@ -145,4 +152,9 @@ CODE_SAMPLE
|
|||
}
|
||||
return null;
|
||||
}
|
||||
private function shouldSkipAttribute(Attribute $attribute) : bool
|
||||
{
|
||||
$attributeName = $attribute->name->toString();
|
||||
return \in_array($attributeName, self::SKIPPED_ATTRIBUTES, \true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace RectorPrefix202301\Symfony\Component\Console\Attribute;
|
|||
/**
|
||||
* Service tag to autoconfigure commands.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
class AsCommand
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace RectorPrefix202301\Symfony\Contracts\Service\Attribute;
|
|||
*
|
||||
* @author Alexander M. Turek <me@derrabus.de>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
|
||||
final class Required
|
||||
{
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ use RectorPrefix202301\Symfony\Contracts\Service\ServiceSubscriberTrait;
|
|||
*
|
||||
* @author Kevin Bond <kevinbond@gmail.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD)]
|
||||
final class SubscribedService
|
||||
{
|
||||
/** @var object[] */
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
||||
|
||||
use RectorPrefix202301\Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
class AsDecorator
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
|||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
class AsTaggedItem
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
|||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||
class Autoconfigure
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
|||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||
class AutoconfigureTag extends Autoconfigure
|
||||
{
|
||||
public function __construct(string $name = null, array $attributes = [])
|
||||
|
|
|
@ -18,6 +18,7 @@ use RectorPrefix202301\Symfony\Component\ExpressionLanguage\Expression;
|
|||
*
|
||||
* @author Kevin Bond <kevinbond@gmail.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_PARAMETER)]
|
||||
class Autowire
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_PARAMETER)]
|
||||
class MapDecorated
|
||||
{
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_PARAMETER)]
|
||||
class TaggedIterator
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_PARAMETER)]
|
||||
class TaggedLocator
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -16,6 +16,7 @@ use RectorPrefix202301\Symfony\Component\DependencyInjection\Exception\InvalidAr
|
|||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_PARAMETER)]
|
||||
final class Target
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;
|
|||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)]
|
||||
class When
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user