Updated Rector to commit c7638288f7

c7638288f7 Fixes docs (#1490)
This commit is contained in:
Tomas Votruba 2021-12-14 12:21:21 +00:00
parent d0b4d2fb7e
commit f48677501c
12 changed files with 36 additions and 33 deletions

View File

@ -7,7 +7,7 @@
],
"require": {
"php": "^7.1|^8.0",
"phpstan/phpstan": "^1.1.1"
"phpstan/phpstan": "^1.2"
},
"autoload": {
"files": [

View File

@ -31,7 +31,7 @@ final class IntersectionTypesRector extends \Rector\Core\Rector\AbstractRector i
final class SomeClass
{
/**
* @param string&int $types
* @param Foo&Bar $types
*/
public function process($types)
{
@ -41,7 +41,7 @@ CODE_SAMPLE
, <<<'CODE_SAMPLE'
final class SomeClass
{
public function process(string&int $types)
public function process(Foo&Bar $types)
{
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '67d1b5f59083cc238e3b011027058ff12afb3574';
public const PACKAGE_VERSION = 'c7638288f7461f46c57307a22b9454c46cfa3cbc';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-14 09:24:54';
public const RELEASE_DATE = '2021-12-14 13:06:50';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211214\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5::getLoader();
return ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5
class ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f', '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\ComposerStaticInit3bf2b473afb553c1535ffd76db3a79b5::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitebeac85f86fc2f2af9fcc64f9ec15e7f::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit3bf2b473afb553c1535ffd76db3a79b5::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitebeac85f86fc2f2af9fcc64f9ec15e7f::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire3bf2b473afb553c1535ffd76db3a79b5($fileIdentifier, $file);
composerRequireebeac85f86fc2f2af9fcc64f9ec15e7f($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire3bf2b473afb553c1535ffd76db3a79b5($fileIdentifier, $file)
function composerRequireebeac85f86fc2f2af9fcc64f9ec15e7f($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

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

View File

@ -2530,12 +2530,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "ed23e6157b4b53f41a437f89f9520c676874f049"
"reference": "1de3f30c210ad2786af7a377cd695f5ccfa29bbb"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/ed23e6157b4b53f41a437f89f9520c676874f049",
"reference": "ed23e6157b4b53f41a437f89f9520c676874f049",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/1de3f30c210ad2786af7a377cd695f5ccfa29bbb",
"reference": "1de3f30c210ad2786af7a377cd695f5ccfa29bbb",
"shasum": ""
},
"require": {
@ -2559,7 +2559,7 @@
"symplify\/rule-doc-generator": "^10.0",
"symplify\/vendor-patches": "^10.0"
},
"time": "2021-12-07T12:20:45+00:00",
"time": "2021-12-14T10:12:47+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2586,7 +2586,7 @@
"description": "Rector upgrades rules for PHPUnit",
"support": {
"issues": "https:\/\/github.com\/rectorphp\/rector-phpunit\/issues",
"source": "https:\/\/github.com\/rectorphp\/rector-phpunit\/tree\/0.11.24"
"source": "https:\/\/github.com\/rectorphp\/rector-phpunit\/tree\/main"
},
"install-path": "..\/rector\/rector-phpunit"
},

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 584d84b'), '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 567cdd2'), '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 36d651e'), '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 4fb1137'), '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 1e3b3ab'), '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 47298f7'), '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 ed23e61'), '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 0a50dc4'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9404116'));
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 584d84b'), '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 567cdd2'), '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 36d651e'), '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 4fb1137'), '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 1e3b3ab'), '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 47298f7'), '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 1de3f30'), '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 0a50dc4'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9404116'));
private function __construct()
{
}

View File

@ -7,6 +7,9 @@ use Rector\CodingStyle\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector;
use Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield;
use Rector\PHPUnit\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\Rector\Class_\ConstructClassMethodToSetUpTestCaseRector;
use Rector\PHPUnit\Rector\MethodCall\AssertCompareToSpecificMethodRector;
use Rector\PHPUnit\Rector\MethodCall\AssertComparisonToSpecificMethodRector;
use Rector\PHPUnit\Rector\MethodCall\AssertEqualsToSameRector;
use Rector\PHPUnit\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector;
use Rector\PHPUnit\Rector\MethodCall\RemoveExpectAnyFromMockRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
@ -17,4 +20,7 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
$services->set(\Rector\CodingStyle\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector::class)->configure([new \Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield('PHPUnit\\Framework\\TestCase', 'provide*'), new \Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield('PHPUnit\\Framework\\TestCase', 'dataProvider*')]);
$services->set(\Rector\PHPUnit\Rector\Class_\ConstructClassMethodToSetUpTestCaseRector::class);
$services->set(\Rector\PHPUnit\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector::class);
$services->set(\Rector\PHPUnit\Rector\MethodCall\AssertEqualsToSameRector::class);
$services->set(\Rector\PHPUnit\Rector\MethodCall\AssertCompareToSpecificMethodRector::class);
$services->set(\Rector\PHPUnit\Rector\MethodCall\AssertComparisonToSpecificMethodRector::class);
};

View File

@ -23,7 +23,7 @@ final class AssertEqualsToSameRector extends \Rector\Core\Rector\AbstractRector
/**
* @var array<string, string>
*/
private const RENAME_METHODS_MAP = ['assertEquals' => 'assertSame'];
private const RENAME_METHODS_MAP = ['assertEquals' => 'assertSame', 'assertNotEquals' => 'assertNotSame'];
/**
* We exclude
* - bool because this is taken care of AssertEqualsParameterToSpecificMethodsTypeRector

View File

@ -6,14 +6,11 @@ $loader = require_once __DIR__.'/autoload.php';
// Aliases for the whitelisted classes. For more information see:
// https://github.com/humbug/php-scoper/blob/master/README.md#class-whitelisting
if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('GenerateChangelogCommand', false) && !trait_exists('GenerateChangelogCommand', false)) {
spl_autoload_call('RectorPrefix20211214\GenerateChangelogCommand');
}
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211214\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5', false) && !interface_exists('ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5', false) && !trait_exists('ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5', false)) {
spl_autoload_call('RectorPrefix20211214\ComposerAutoloaderInit3bf2b473afb553c1535ffd76db3a79b5');
if (!class_exists('ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f', false) && !interface_exists('ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f', false) && !trait_exists('ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f', false)) {
spl_autoload_call('RectorPrefix20211214\ComposerAutoloaderInitebeac85f86fc2f2af9fcc64f9ec15e7f');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20211214\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +78,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211214\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire3bf2b473afb553c1535ffd76db3a79b5')) {
function composerRequire3bf2b473afb553c1535ffd76db3a79b5() {
return \RectorPrefix20211214\composerRequire3bf2b473afb553c1535ffd76db3a79b5(...func_get_args());
if (!function_exists('composerRequireebeac85f86fc2f2af9fcc64f9ec15e7f')) {
function composerRequireebeac85f86fc2f2af9fcc64f9ec15e7f() {
return \RectorPrefix20211214\composerRequireebeac85f86fc2f2af9fcc64f9ec15e7f(...func_get_args());
}
}
if (!function_exists('scanPath')) {