Skip to content

Commit

Permalink
Rector 0.15.10
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 21, 2023
1 parent 39a38b4 commit 000bfb6
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc::getLoader();
return ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit8c2c957765ed34d4e254ccb1d98dbbcc
class ComposerAutoloaderInit7e658fbe9fcecca748641e9505f9eb08
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
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;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit8c2c957765ed34d4e254ccb1d98dbbcc
class ComposerStaticInit7e658fbe9fcecca748641e9505f9eb08
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions vendor/nette/utils/src/Iterators/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function __construct(\Traversable $iterator, callable $callback)
parent::__construct($iterator);
$this->callback = $callback;
}
#[\ReturnTypeWillChange]
public function current()
{
return ($this->callback)(parent::current(), parent::key());
Expand Down
1 change: 1 addition & 0 deletions vendor/nette/utils/src/Utils/ArrayHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function offsetSet($key, $value) : void
* @param string|int $key
* @return T
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->{$key};
Expand Down
1 change: 1 addition & 0 deletions vendor/nette/utils/src/Utils/ArrayList.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function offsetSet($index, $value) : void
* @return T
* @throws Nette\OutOfRangeException
*/
#[\ReturnTypeWillChange]
public function offsetGet($index)
{
if (!\is_int($index) || $index < 0 || $index >= \count($this->list)) {
Expand Down
1 change: 1 addition & 0 deletions vendor/nette/utils/src/Utils/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static function fromParts(int $year, int $month, int $day, int $hour = 0,
* @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) {
Expand Down
1 change: 1 addition & 0 deletions vendor/nette/utils/src/Utils/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ public final function offsetSet($index, $child) : void
* @param int $index
* @return HtmlStringable|string
*/
#[\ReturnTypeWillChange]
public final function offsetGet($index)
{
return $this->children[$index];
Expand Down
2 changes: 1 addition & 1 deletion vendor/rector/extension-installer/src/GeneratedConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
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()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
*/
final class DowngradeAttributeToAnnotationRector extends AbstractRector implements ConfigurableRectorInterface
{
/**
* @var string[]
*/
private const SKIPPED_ATTRIBUTES = ['Attribute', 'ReturnTypeWillChange'];
/**
* @var DowngradeAttributeToAnnotation[]
*/
Expand Down Expand Up @@ -88,6 +92,9 @@ public function refactor(Node $node) : ?Node
$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
Expand Down Expand Up @@ -145,4 +152,9 @@ private function matchAttributeToAnnotation(Attribute $attribute, array $attribu
}
return null;
}
private function shouldSkipAttribute(Attribute $attribute) : bool
{
$attributeName = $attribute->name->toString();
return \in_array($attributeName, self::SKIPPED_ATTRIBUTES, \true);
}
}
1 change: 1 addition & 0 deletions vendor/symfony/console/Attribute/AsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/**
* Service tag to autoconfigure commands.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsCommand
{
/**
Expand Down
1 change: 1 addition & 0 deletions vendor/symfony/contracts/Service/Attribute/Required.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
* @author Alexander M. Turek <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
final class Required
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*
* @author Kevin Bond <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
final class SubscribedService
{
/** @var object[] */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;

use RectorPrefix202301\Symfony\Component\DependencyInjection\ContainerInterface;
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsDecorator
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* @author Nicolas Grekas <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsTaggedItem
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* @author Nicolas Grekas <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
class Autoconfigure
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* @author Nicolas Grekas <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
class AutoconfigureTag extends Autoconfigure
{
public function __construct(string $name = null, array $attributes = [])
Expand Down
1 change: 1 addition & 0 deletions vendor/symfony/dependency-injection/Attribute/Autowire.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
* @author Kevin Bond <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class Autowire
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;

#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapDecorated
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;

#[\Attribute(\Attribute::TARGET_PARAMETER)]
class TaggedIterator
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
namespace RectorPrefix202301\Symfony\Component\DependencyInjection\Attribute;

#[\Attribute(\Attribute::TARGET_PARAMETER)]
class TaggedLocator
{
/**
Expand Down
1 change: 1 addition & 0 deletions vendor/symfony/dependency-injection/Attribute/Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*
* @author Nicolas Grekas <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
final class Target
{
/**
Expand Down
1 change: 1 addition & 0 deletions vendor/symfony/dependency-injection/Attribute/When.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* @author Nicolas Grekas <[email protected]>
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)]
class When
{
/**
Expand Down

0 comments on commit 000bfb6

Please sign in to comment.