1
0
mirror of https://github.com/rectorphp/rector.git synced 2025-05-14 20:05:25 +02:00

Updated Rector to commit b8b1155ffe068cfb0a1a702dfd00e21bf711c46d

b8b1155ffe try polyfill is_list
This commit is contained in:
Tomas Votruba 2023-06-06 17:02:20 +00:00
parent 075297ce56
commit 515eba1ef3
16 changed files with 272 additions and 14 deletions

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0af705fb570340cb0e4fbc0b9e897b09bd172f5c';
public const PACKAGE_VERSION = 'b8b1155ffe068cfb0a1a702dfd00e21bf711c46d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-06-06 18:36:26';
public const RELEASE_DATE = '2023-06-06 18:57:56';
/**
* @var int
*/

@ -15,7 +15,7 @@ final class RectorKernel
/**
* @var string
*/
private const CACHE_KEY = 'v63';
private const CACHE_KEY = 'v64';
/**
* @var \Symfony\Component\DependencyInjection\ContainerInterface|null
*/

2
vendor/autoload.php vendored

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit676759b8e47d3081b47cdf1707b8a0d7::getLoader();
return ComposerAutoloaderInit4062e991fac87b34772d073acdecfb6a::getLoader();

@ -2780,8 +2780,10 @@ return array(
'Rector\\Visibility\\Rector\\ClassMethod\\ExplicitPublicClassMethodRector' => $baseDir . '/rules/Visibility/Rector/ClassMethod/ExplicitPublicClassMethodRector.php',
'Rector\\Visibility\\ValueObject\\ChangeConstantVisibility' => $baseDir . '/rules/Visibility/ValueObject/ChangeConstantVisibility.php',
'Rector\\Visibility\\ValueObject\\ChangeMethodVisibility' => $baseDir . '/rules/Visibility/ValueObject/ChangeMethodVisibility.php',
'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
'Symfony\\Polyfill\\Php81\\Php81' => $vendorDir . '/symfony/polyfill-php81/Php81.php',
'Symplify\\RuleDocGenerator\\Contract\\Category\\CategoryInfererInterface' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php',
'Symplify\\RuleDocGenerator\\Contract\\CodeSampleInterface' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/Contract/CodeSampleInterface.php',
'Symplify\\RuleDocGenerator\\Contract\\ConfigurableRuleInterface' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/Contract/ConfigurableRuleInterface.php',

@ -13,6 +13,7 @@ return array(
'972fda704d680a3a53c68e34e193cb22' => $vendorDir . '/react/promise-timer/src/functions_include.php',
'9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
'2324d0e5cadd603331d27de142371f0b' => $vendorDir . '/symfony/contracts/Deprecation/function.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'd507e002f7fce7f0c6dbf1f22edcb902' => $vendorDir . '/tracy/tracy/src/Tracy/functions.php',
'4508688f3cab21375725e8d11ca194a2' => $baseDir . '/src/constants.php',
'30bca7fff093e8069bed7c55247e2bf8' => $baseDir . '/src/functions/node_helper.php',

@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir);
return array(
'Symplify\\RuleDocGenerator\\' => array($vendorDir . '/symplify/rule-doc-generator-contracts/src'),
'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Rector\\Utils\\' => array($baseDir . '/utils'),

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit676759b8e47d3081b47cdf1707b8a0d7
class ComposerAutoloaderInit4062e991fac87b34772d073acdecfb6a
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit676759b8e47d3081b47cdf1707b8a0d7
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit676759b8e47d3081b47cdf1707b8a0d7', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit4062e991fac87b34772d073acdecfb6a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit676759b8e47d3081b47cdf1707b8a0d7', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit4062e991fac87b34772d073acdecfb6a', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit4062e991fac87b34772d073acdecfb6a::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit4062e991fac87b34772d073acdecfb6a::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
class ComposerStaticInit4062e991fac87b34772d073acdecfb6a
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -14,6 +14,7 @@ class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
'972fda704d680a3a53c68e34e193cb22' => __DIR__ . '/..' . '/react/promise-timer/src/functions_include.php',
'9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
'2324d0e5cadd603331d27de142371f0b' => __DIR__ . '/..' . '/symfony/contracts/Deprecation/function.php',
'23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
'd507e002f7fce7f0c6dbf1f22edcb902' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/functions.php',
'4508688f3cab21375725e8d11ca194a2' => __DIR__ . '/../..' . '/src/constants.php',
'30bca7fff093e8069bed7c55247e2bf8' => __DIR__ . '/../..' . '/src/functions/node_helper.php',
@ -23,6 +24,7 @@ class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
'S' =>
array (
'Symplify\\RuleDocGenerator\\' => 26,
'Symfony\\Polyfill\\Php81\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
),
@ -78,6 +80,10 @@ class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
array (
0 => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src',
),
'Symfony\\Polyfill\\Php81\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php81',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
@ -3022,8 +3028,10 @@ class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
'Rector\\Visibility\\Rector\\ClassMethod\\ExplicitPublicClassMethodRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/ClassMethod/ExplicitPublicClassMethodRector.php',
'Rector\\Visibility\\ValueObject\\ChangeConstantVisibility' => __DIR__ . '/../..' . '/rules/Visibility/ValueObject/ChangeConstantVisibility.php',
'Rector\\Visibility\\ValueObject\\ChangeMethodVisibility' => __DIR__ . '/../..' . '/rules/Visibility/ValueObject/ChangeMethodVisibility.php',
'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
'Symfony\\Polyfill\\Php81\\Php81' => __DIR__ . '/..' . '/symfony/polyfill-php81/Php81.php',
'Symplify\\RuleDocGenerator\\Contract\\Category\\CategoryInfererInterface' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php',
'Symplify\\RuleDocGenerator\\Contract\\CodeSampleInterface' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/Contract/CodeSampleInterface.php',
'Symplify\\RuleDocGenerator\\Contract\\ConfigurableRuleInterface' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/Contract/ConfigurableRuleInterface.php',
@ -3042,9 +3050,9 @@ class ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit676759b8e47d3081b47cdf1707b8a0d7::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit4062e991fac87b34772d073acdecfb6a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4062e991fac87b34772d073acdecfb6a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4062e991fac87b34772d073acdecfb6a::$classMap;
}, null, ClassLoader::class);
}

@ -2858,6 +2858,88 @@
],
"install-path": "..\/symfony\/polyfill-mbstring"
},
{
"name": "symfony\/polyfill-php81",
"version": "v1.27.0",
"version_normalized": "1.27.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/polyfill-php81.git",
"reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-php81\/zipball\/707403074c8ea6e2edaf8794b0157a0bfa52157a",
"reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"time": "2022-11-03T14:55:06+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony\/polyfill",
"url": "https:\/\/github.com\/symfony\/polyfill"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources\/stubs"
]
},
"notification-url": "https:\/\/packagist.org\/downloads\/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https:\/\/symfony.com\/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https:\/\/symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https:\/\/github.com\/symfony\/polyfill-php81\/tree\/v1.27.0"
},
"funding": [
{
"url": "https:\/\/symfony.com\/sponsor",
"type": "custom"
},
{
"url": "https:\/\/github.com\/fabpot",
"type": "github"
},
{
"url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony",
"type": "tidelift"
}
],
"install-path": "..\/symfony\/polyfill-php81"
},
{
"name": "symfony\/process",
"version": "v6.3.0",

File diff suppressed because one or more lines are too long

19
vendor/symfony/polyfill-php81/LICENSE vendored Normal file

@ -0,0 +1,19 @@
Copyright (c) 2021 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

33
vendor/symfony/polyfill-php81/Php81.php vendored Normal file

@ -0,0 +1,33 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Php81;
/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class Php81
{
public static function array_is_list(array $array) : bool
{
if ([] === $array || $array === \array_values($array)) {
return \true;
}
$nextKey = -1;
foreach ($array as $k => $v) {
if ($k !== ++$nextKey) {
return \false;
}
}
return \true;
}
}

17
vendor/symfony/polyfill-php81/README.md vendored Normal file

@ -0,0 +1,17 @@
Symfony Polyfill / Php81
========================
This component provides features added to PHP 8.1 core:
- [`array_is_list`](https://php.net/array_is_list)
- [`enum_exists`](https://php.net/enum-exists)
- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
License
=======
This library is released under the [MIT license](LICENSE).

@ -0,0 +1,20 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (\PHP_VERSION_ID < 80100) {
#[Attribute(Attribute::TARGET_METHOD)]
final class ReturnTypeWillChange
{
public function __construct()
{
}
}
}

@ -0,0 +1,28 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Php81 as p;
if (\PHP_VERSION_ID >= 80100) {
return;
}
if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
define('MYSQLI_REFRESH_REPLICA', 64);
}
if (!function_exists('array_is_list')) {
function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
}
if (!function_exists('enum_exists')) {
function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
}

@ -0,0 +1,47 @@
{
"name": "symfony\/polyfill-php81",
"type": "library",
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"keywords": [
"polyfill",
"shim",
"compatibility",
"portable"
],
"homepage": "https:\/\/symfony.com",
"license": "MIT",
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https:\/\/symfony.com\/contributors"
}
],
"require": {
"php": ">=7.1"
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources\/stubs"
]
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony\/polyfill",
"url": "https:\/\/github.com\/symfony\/polyfill"
}
}
}