Updated Rector to commit 0ffaacaf3cf1094d3abfb3e0aee9543d12aa6490

0ffaacaf3c Cleanup set list from old sets (#2684)
This commit is contained in:
Tomas Votruba 2022-07-19 18:21:38 +00:00
parent 6f849831d7
commit ab3565ff17
30 changed files with 114 additions and 168 deletions

View File

@ -1,13 +0,0 @@
<?php
declare (strict_types=1);
namespace RectorPrefix202207;
use Rector\Config\RectorConfig;
// @see https://ocramius.github.io/blog/fluent-interfaces-are-evil/
// @see https://www.yegor256.com/2018/03/13/fluent-interfaces.html
return static function (RectorConfig $rectorConfig) : void {
$deprecatedMessage = \sprintf('The DEFLUENT set is deprecated for high number of assumptions and reported bugs. Better use PHPStan rule "%s" to warn about these cases and refactor manually.', 'https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#nochainmethodcallrule');
\trigger_error($deprecatedMessage);
\sleep(3);
};

View File

@ -1,27 +0,0 @@
<?php
declare (strict_types=1);
namespace RectorPrefix202207;
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
// Rename is now move, specific for files.
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'rename', 'move'),
// No arbitrary abbreviations
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'createDir', 'createDirectory'),
// Writes are now deterministic
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'update', 'write'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'updateStream', 'writeStream'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'put', 'write'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'putStream', 'writeStream'),
// Metadata getters are renamed
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getTimestamp', 'lastModified'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'has', 'fileExists'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getMimetype', 'mimeType'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getSize', 'fileSize'),
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getVisibility', 'visibility'),
]);
};

View File

@ -1,18 +0,0 @@
<?php
declare (strict_types=1);
namespace RectorPrefix202207;
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Transform\Rector\FuncCall\FuncCallToMethodCallRector;
use Rector\Transform\Rector\StaticCall\StaticCallToFuncCallRector;
use Rector\Transform\ValueObject\FuncCallToMethodCall;
use Rector\Transform\ValueObject\StaticCallToFuncCall;
return static function (RectorConfig $rectorConfig) : void {
$configuration = [new FuncCallToMethodCall('GuzzleHttp\\json_decode', 'GuzzleHttp\\Utils', 'jsonDecode'), new FuncCallToMethodCall('GuzzleHttp\\get_path', 'GuzzleHttp\\Utils', 'getPath')];
$rectorConfig->ruleWithConfiguration(FuncCallToMethodCallRector::class, $configuration);
$rectorConfig->ruleWithConfiguration(StaticCallToFuncCallRector::class, [new StaticCallToFuncCall('GuzzleHttp\\Utils', 'setPath', 'GuzzleHttp\\set_path'), new StaticCallToFuncCall('GuzzleHttp\\Pool', 'batch', 'GuzzleHttp\\Pool\\batch')]);
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [new MethodCallRename('GuzzleHttp\\Message\\MessageInterface', 'getHeaderLines', 'getHeaderAsArray')]);
};

View File

@ -9,10 +9,6 @@ use Rector\Set\Contract\SetListInterface;
*/
final class SetList implements SetListInterface
{
/**
* @var string
*/
public const DEFLUENT = __DIR__ . '/../../../config/set/defluent.php';
/**
* @var string
*/
@ -29,18 +25,6 @@ final class SetList implements SetListInterface
* @var string
*/
public const DEAD_CODE = __DIR__ . '/../../../config/set/dead-code.php';
/**
* @var string
*/
public const FLYSYSTEM_20 = __DIR__ . '/../../../config/set/flysystem-20.php';
/**
* @var string
*/
public const FRAMEWORK_EXTRA_BUNDLE_40 = __DIR__ . '/../../../config/set/framework-extra-bundle-40.php';
/**
* @var string
*/
public const FRAMEWORK_EXTRA_BUNDLE_50 = __DIR__ . '/../../../config/set/framework-extra-bundle-50.php';
/**
* @var string
*/

View File

@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'd030813bb995528a026e8ea3c84028fd47a4debd';
public const PACKAGE_VERSION = '0ffaacaf3cf1094d3abfb3e0aee9543d12aa6490';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-07-19 08:17:03';
public const RELEASE_DATE = '2022-07-19 18:16:16';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit988bae3b441b8408e739904e807e49d8
class ComposerAutoloaderInita04cc82ee7ed84a7e5caa61c2f4beb64
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit988bae3b441b8408e739904e807e49d8
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit988bae3b441b8408e739904e807e49d8', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInita04cc82ee7ed84a7e5caa61c2f4beb64', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit988bae3b441b8408e739904e807e49d8', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInita04cc82ee7ed84a7e5caa61c2f4beb64', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit988bae3b441b8408e739904e807e49d8::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit988bae3b441b8408e739904e807e49d8::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire988bae3b441b8408e739904e807e49d8($fileIdentifier, $file);
composerRequirea04cc82ee7ed84a7e5caa61c2f4beb64($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit988bae3b441b8408e739904e807e49d8
* @param string $file
* @return void
*/
function composerRequire988bae3b441b8408e739904e807e49d8($fileIdentifier, $file)
function composerRequirea04cc82ee7ed84a7e5caa61c2f4beb64($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit988bae3b441b8408e739904e807e49d8
class ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3414,9 +3414,9 @@ class ComposerStaticInit988bae3b441b8408e739904e807e49d8
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit988bae3b441b8408e739904e807e49d8::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit988bae3b441b8408e739904e807e49d8::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit988bae3b441b8408e739904e807e49d8::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita04cc82ee7ed84a7e5caa61c2f4beb64::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1854,12 +1854,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-cakephp.git",
"reference": "86ab8c377f4aedd015bfa91b8eb6c08237d5733a"
"reference": "ec9661647a2619b7939f8cbf1fd9dacc8333017c"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-cakephp\/zipball\/86ab8c377f4aedd015bfa91b8eb6c08237d5733a",
"reference": "86ab8c377f4aedd015bfa91b8eb6c08237d5733a",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-cakephp\/zipball\/ec9661647a2619b7939f8cbf1fd9dacc8333017c",
"reference": "ec9661647a2619b7939f8cbf1fd9dacc8333017c",
"shasum": ""
},
"require": {
@ -1872,7 +1872,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"phpstan\/phpstan": "^1.7",
"phpstan\/phpstan": "^1.8.1",
"phpstan\/phpstan-strict-rules": "^1.1",
"phpstan\/phpstan-webmozart-assert": "^1.0",
"phpunit\/phpunit": "^9.5",
@ -1885,7 +1885,7 @@
"symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0"
},
"time": "2022-07-01T09:37:59+00:00",
"time": "2022-07-19T09:18:37+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1923,12 +1923,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "04125394e5ad08756843d2801ac8c9d68ae98cca"
"reference": "0e3ef75e7105fd88ef0c989c9b797c177764d6bb"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/04125394e5ad08756843d2801ac8c9d68ae98cca",
"reference": "04125394e5ad08756843d2801ac8c9d68ae98cca",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/0e3ef75e7105fd88ef0c989c9b797c177764d6bb",
"reference": "0e3ef75e7105fd88ef0c989c9b797c177764d6bb",
"shasum": ""
},
"require": {
@ -1940,7 +1940,7 @@
"require-dev": {
"doctrine\/orm": "^2.10",
"phpstan\/extension-installer": "^1.1",
"phpstan\/phpstan": "^1.7",
"phpstan\/phpstan": "^1.8.1",
"phpstan\/phpstan-strict-rules": "^1.1",
"phpstan\/phpstan-webmozart-assert": "^1.0",
"phpunit\/phpunit": "^9.5",
@ -1953,7 +1953,7 @@
"symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0"
},
"time": "2022-07-19T06:53:19+00:00",
"time": "2022-07-19T09:19:44+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2280,12 +2280,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpoffice.git",
"reference": "d82661887258a84d57465d34f0960653c4018a5a"
"reference": "c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpoffice\/zipball\/d82661887258a84d57465d34f0960653c4018a5a",
"reference": "d82661887258a84d57465d34f0960653c4018a5a",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpoffice\/zipball\/c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494",
"reference": "c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494",
"shasum": ""
},
"require": {
@ -2296,7 +2296,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"phpstan\/phpstan": "^1.7.15",
"phpstan\/phpstan": "^1.8.1",
"phpstan\/phpstan-strict-rules": "^1.1",
"phpstan\/phpstan-webmozart-assert": "^1.0",
"phpunit\/phpunit": "^9.5",
@ -2309,7 +2309,7 @@
"symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0"
},
"time": "2022-07-01T09:37:48+00:00",
"time": "2022-07-19T09:38:45+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2347,12 +2347,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "b44203e491b69e5638fc439620b39549fa8c1bc6"
"reference": "d876ff24f19dcda4ed98e1e8def974f83d8b7b34"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/b44203e491b69e5638fc439620b39549fa8c1bc6",
"reference": "b44203e491b69e5638fc439620b39549fa8c1bc6",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/d876ff24f19dcda4ed98e1e8def974f83d8b7b34",
"reference": "d876ff24f19dcda4ed98e1e8def974f83d8b7b34",
"shasum": ""
},
"require": {
@ -2377,7 +2377,7 @@
"symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0"
},
"time": "2022-07-15T15:14:17+00:00",
"time": "2022-07-19T09:28:42+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2415,12 +2415,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "2053a16e0fa3f90f5840e4058992266cd9d6233c"
"reference": "02da3cb4fe710c18060bc5d2fcb32fb4097c7729"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/2053a16e0fa3f90f5840e4058992266cd9d6233c",
"reference": "2053a16e0fa3f90f5840e4058992266cd9d6233c",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/02da3cb4fe710c18060bc5d2fcb32fb4097c7729",
"reference": "02da3cb4fe710c18060bc5d2fcb32fb4097c7729",
"shasum": ""
},
"require": {
@ -2449,7 +2449,7 @@
"symplify\/rule-doc-generator": "^11.0",
"symplify\/vendor-patches": "^11.0"
},
"time": "2022-07-16T16:09:39+00:00",
"time": "2022-07-19T18:07:23+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -3329,12 +3329,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/astral.git",
"reference": "21e0a3e792a6304ab5eac3b6059ebd0f786e70a8"
"reference": "021d88fab575e79fd1efd7709cd129265923a009"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/astral\/zipball\/21e0a3e792a6304ab5eac3b6059ebd0f786e70a8",
"reference": "21e0a3e792a6304ab5eac3b6059ebd0f786e70a8",
"url": "https:\/\/api.github.com\/repos\/symplify\/astral\/zipball\/021d88fab575e79fd1efd7709cd129265923a009",
"reference": "021d88fab575e79fd1efd7709cd129265923a009",
"shasum": ""
},
"require": {
@ -3375,7 +3375,7 @@
"phpunit\/phpunit": "^9.5",
"symplify\/easy-testing": "^11.1"
},
"time": "2022-07-18T20:52:39+00:00",
"time": "2022-07-19T12:10:47+00:00",
"default-branch": true,
"type": "phpstan-extension",
"extra": {
@ -3657,12 +3657,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/easy-testing.git",
"reference": "ae96304acc0ff841ba111c338e9890175884c757"
"reference": "422739af1633d38486830845555f43fc0ab8a73a"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/easy-testing\/zipball\/ae96304acc0ff841ba111c338e9890175884c757",
"reference": "ae96304acc0ff841ba111c338e9890175884c757",
"url": "https:\/\/api.github.com\/repos\/symplify\/easy-testing\/zipball\/422739af1633d38486830845555f43fc0ab8a73a",
"reference": "422739af1633d38486830845555f43fc0ab8a73a",
"shasum": ""
},
"require": {
@ -3698,7 +3698,7 @@
"require-dev": {
"phpunit\/phpunit": "^9.5"
},
"time": "2022-07-05T11:51:11+00:00",
"time": "2022-07-19T10:51:13+00:00",
"default-branch": true,
"bin": [
"bin\/easy-testing"
@ -3984,12 +3984,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/smart-file-system.git",
"reference": "1d3182282bc843dd93a30d49da486b91c91b3255"
"reference": "9a2266634495de04abdbcc0af8193715ab00d2a9"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/smart-file-system\/zipball\/1d3182282bc843dd93a30d49da486b91c91b3255",
"reference": "1d3182282bc843dd93a30d49da486b91c91b3255",
"url": "https:\/\/api.github.com\/repos\/symplify\/smart-file-system\/zipball\/9a2266634495de04abdbcc0af8193715ab00d2a9",
"reference": "9a2266634495de04abdbcc0af8193715ab00d2a9",
"shasum": ""
},
"require": {
@ -4025,7 +4025,7 @@
"nette\/finder": "^2.5",
"phpunit\/phpunit": "^9.5"
},
"time": "2022-07-18T20:42:44+00:00",
"time": "2022-07-19T10:51:31+00:00",
"default-branch": true,
"type": "library",
"extra": {
@ -4132,17 +4132,17 @@
},
{
"name": "tracy\/tracy",
"version": "v2.9.3",
"version_normalized": "2.9.3.0",
"version": "v2.9.4",
"version_normalized": "2.9.4.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/nette\/tracy.git",
"reference": "3aadc88c00d7aca84ce2f07da236a703cc183d52"
"reference": "0ed605329b095f5f5fe2db2adc3d1ee80c917294"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/nette\/tracy\/zipball\/3aadc88c00d7aca84ce2f07da236a703cc183d52",
"reference": "3aadc88c00d7aca84ce2f07da236a703cc183d52",
"url": "https:\/\/api.github.com\/repos\/nette\/tracy\/zipball\/0ed605329b095f5f5fe2db2adc3d1ee80c917294",
"reference": "0ed605329b095f5f5fe2db2adc3d1ee80c917294",
"shasum": ""
},
"require": {
@ -4162,7 +4162,7 @@
"phpstan\/phpstan": "^1.0",
"psr\/log": "^1.0 || ^2.0 || ^3.0"
},
"time": "2022-05-30T19:31:14+00:00",
"time": "2022-07-19T14:06:15+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -4203,7 +4203,7 @@
],
"support": {
"issues": "https:\/\/github.com\/nette\/tracy\/issues",
"source": "https:\/\/github.com\/nette\/tracy\/tree\/v2.9.3"
"source": "https:\/\/github.com\/nette\/tracy\/tree\/v2.9.4"
},
"install-path": "..\/tracy\/tracy"
},

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-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 86ab8c3'), '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 0412539'), '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 7ee4e58'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main be4b95a'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 987bdb4'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a8b6b24'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d826618'), '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 b44203e'), '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 2053a16'));
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ec96616'), '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 0e3ef75'), '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 7ee4e58'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main be4b95a'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 987bdb4'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a8b6b24'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c7d2f5f'), '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 d876ff2'), '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 02da3cb'));
private function __construct()
{
}

View File

@ -9,7 +9,7 @@
"symfony\/string": "^6.0"
},
"require-dev": {
"phpstan\/phpstan": "^1.7",
"phpstan\/phpstan": "^1.8.1",
"rector\/rector-src": "dev-main",
"phpunit\/phpunit": "^9.5",
"symplify\/phpstan-rules": "^11.0",

View File

@ -9,7 +9,7 @@
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"rector\/phpstan-rules": "^0.5",
"phpstan\/phpstan": "^1.7",
"phpstan\/phpstan": "^1.8.1",
"phpunit\/phpunit": "^9.5",
"symplify\/phpstan-rules": "^11.0",
"symplify\/phpstan-extensions": "^11.0",

View File

@ -9,7 +9,7 @@
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"rector\/phpstan-rules": "^0.5.5",
"phpstan\/phpstan": "^1.7.15",
"phpstan\/phpstan": "^1.8.1",
"phpunit\/phpunit": "^9.5",
"symplify\/phpstan-rules": "^11.0",
"symplify\/phpstan-extensions": "^11.0",

View File

@ -7,6 +7,7 @@ use Rector\Set\Contract\SetListInterface;
final class PHPOfficeSetList implements SetListInterface
{
/**
* @api
* @var string
*/
public const PHPEXCEL_TO_PHPSPREADSHEET = __DIR__ . '/../../config/sets/phpexcel-to-phpspreadsheet.php';

View File

@ -106,12 +106,12 @@ final class AssertIssetToSpecificMethodRector extends AbstractRector
}
private function hasMagicIsset(Node $node) : bool
{
$resolved = $this->nodeTypeResolver->getType($node);
if (!$resolved instanceof TypeWithClassName) {
$type = $this->nodeTypeResolver->getType($node);
if (!$type instanceof TypeWithClassName) {
// object not found, skip
return $resolved instanceof ObjectWithoutClassType;
return $type instanceof ObjectWithoutClassType;
}
$classReflection = $resolved->getClassReflection();
$classReflection = $type->getClassReflection();
if (!$classReflection instanceof ClassReflection) {
return \false;
}

View File

@ -71,9 +71,9 @@ final class NeighbourClassLikePrinter
*/
private function resolveDeclares($mainNode) : array
{
$declare = $this->betterNodeFinder->findFirstPreviousOfTypes($mainNode, [Declare_::class]);
if ($declare instanceof Declare_) {
return [$declare];
$node = $this->betterNodeFinder->findFirstPreviousOfTypes($mainNode, [Declare_::class]);
if ($node instanceof Declare_) {
return [$node];
}
return [];
}

View File

@ -182,15 +182,15 @@ CODE_SAMPLE
}
private function hasLastReturnResponse(ClassMethod $classMethod) : bool
{
$lastReturn = $this->betterNodeFinder->findLastInstanceOf((array) $classMethod->stmts, Return_::class);
if (!$lastReturn instanceof Return_) {
$node = $this->betterNodeFinder->findLastInstanceOf((array) $classMethod->stmts, Return_::class);
if (!$node instanceof Return_) {
return \false;
}
if ($lastReturn->expr === null) {
if ($node->expr === null) {
return \false;
}
$responseObjectType = new ObjectType(self::RESPONSE_CLASS);
$returnType = $this->getType($lastReturn->expr);
$returnType = $this->getType($node->expr);
return $responseObjectType->isSuperTypeOf($returnType)->yes();
}
private function refactorReturn(Return_ $return, DoctrineAnnotationTagValueNode $templateDoctrineAnnotationTagValueNode, bool $hasThisRenderOrReturnsResponse, ClassMethod $classMethod) : void

View File

@ -98,11 +98,11 @@ CODE_SAMPLE
}
private function resolveCommandName(Class_ $class) : ?Node
{
$commandName = $this->resolveCommandNameFromConstructor($class);
if (!$commandName instanceof Node) {
$node = $this->resolveCommandNameFromConstructor($class);
if (!$node instanceof Node) {
return $this->resolveCommandNameFromSetName($class);
}
return $commandName;
return $node;
}
private function resolveCommandNameFromConstructor(Class_ $class) : ?Node
{

View File

@ -84,11 +84,11 @@ CODE_SAMPLE
if (!$secondArg instanceof Arg) {
return null;
}
$parentVariable = $this->getParentOfGetStatusCode($secondArg->value);
if (!$parentVariable instanceof Expr) {
$expr = $this->getParentOfGetStatusCode($secondArg->value);
if (!$expr instanceof Expr) {
return null;
}
$getContentMethodCall = new MethodCall($parentVariable, 'getContent');
$getContentMethodCall = new MethodCall($expr, 'getContent');
$node->args[2] = new Arg($getContentMethodCall);
return $node;
}

View File

@ -6,6 +6,14 @@ namespace Rector\Symfony\Set;
use Rector\Set\Contract\SetListInterface;
final class SensiolabsSetList implements SetListInterface
{
/**
* @var string
*/
public const FRAMEWORK_EXTRA_40 = __DIR__ . '/../../config/sets/sensiolabs/framework-extra-40.php';
/**
* @var string
*/
public const FRAMEWORK_EXTRA_50 = __DIR__ . '/../../config/sets/sensiolabs/framework-extra-50.php';
/**
* @var string
*/

View File

@ -21,7 +21,7 @@ final class SimpleNameResolver
* @see https://regex101.com/r/ChpDsj/1
* @var string
*/
private const ANONYMOUS_CLASS_REGEX = '#^AnonymousClass[\\w+]#';
public const ANONYMOUS_CLASS_REGEX = '#^AnonymousClass[\\w+]#';
/**
* @var NodeNameResolverInterface[]
*/

View File

@ -71,11 +71,11 @@ final class ReflectionParser
}
public function parseClassReflection(ClassReflection $classReflection) : ?ClassLike
{
$filename = $classReflection->getFileName();
if ($filename === null) {
$fileName = $classReflection->getFileName();
if ($fileName === null) {
return null;
}
return $this->parseFilenameToClass($filename);
return $this->parseFilenameToClass($fileName);
}
/**
* @param \ReflectionClass|\PHPStan\Reflection\ClassReflection $reflectionClass

View File

@ -74,8 +74,8 @@ final class StaticFixtureSplitter
private static function createTemporaryPathWithPrefix(SmartFileInfo $smartFileInfo, string $prefix) : string
{
$hash = Strings::substring(\md5($smartFileInfo->getRealPath()), -20);
$fileBaseName = $smartFileInfo->getBasename('.inc');
return self::getTemporaryPath() . \sprintf('/%s_%s_%s', $prefix, $hash, $fileBaseName);
$fileBasename = $smartFileInfo->getBasename('.inc');
return self::getTemporaryPath() . \sprintf('/%s_%s_%s', $prefix, $hash, $fileBasename);
}
/**
* @param mixed $expected

View File

@ -19,18 +19,18 @@ final class SmartFileSystem extends Filesystem
/**
* @see https://github.com/symfony/filesystem/pull/4/files
*/
public function readFile(string $filename) : string
public function readFile(string $fileName) : string
{
$source = @\file_get_contents($filename);
$source = @\file_get_contents($fileName);
if (!$source) {
$message = \sprintf('Failed to read "%s" file: "%s"', $filename, $this->getLastError());
throw new IOException($message, 0, null, $filename);
$message = \sprintf('Failed to read "%s" file: "%s"', $fileName, $this->getLastError());
throw new IOException($message, 0, null, $fileName);
}
return $source;
}
public function readFileToSmartFileInfo(string $filename) : SmartFileInfo
public function readFileToSmartFileInfo(string $fileName) : SmartFileInfo
{
return new SmartFileInfo($filename);
return new SmartFileInfo($fileName);
}
/**
* Converts given HTML code to plain text

View File

@ -6,9 +6,16 @@
--tracy-space: 16px;
}
html, body {
@media (max-width: 600px) {
:root {
--tracy-space: 8px;
}
}
html.tracy-bs-visible,
html.tracy-bs-visible body {
display: block;
overflow: visible;
overflow: auto;
}
#tracy-bs {

View File

@ -7,6 +7,7 @@ class BlueScreen
static init(ajax) {
let blueScreen = document.getElementById('tracy-bs');
document.documentElement.classList.add('tracy-bs-visible');
if (navigator.platform.indexOf('Mac') > -1) {
blueScreen.classList.add('tracy-mac');
}
@ -31,7 +32,10 @@ class BlueScreen
});
blueScreen.addEventListener('tracy-toggle', (e) => {
if (!e.target.matches('.tracy-dump *') && e.detail.originalEvent) {
if (e.target.matches('#tracy-bs-toggle')) { // blue screen toggle
document.documentElement.classList.toggle('tracy-bs-visible', !e.detail.collapsed);
} else if (!e.target.matches('.tracy-dump *') && e.detail.originalEvent) { // panel toggle
e.detail.relatedTarget.classList.toggle('tracy-panel-fadein', !e.detail.collapsed);
}
});

View File

@ -13,7 +13,7 @@ use ErrorException;
*/
class Debugger
{
public const VERSION = '2.9.3';
public const VERSION = '2.9.4';
/** server modes for Debugger::enable() */
public const DEVELOPMENT = \false, PRODUCTION = \true, DETECT = null;
public const COOKIE_SECRET = 'tracy-debug';