Updated Rector to commit 0ea7b49d5839f4dcdf5c9966cf410b3394c5e060

0ea7b49d58 [Testing] Remove require_once on TestingParser::parseFileToDecoratedNodes() (#4009)
This commit is contained in:
Tomas Votruba 2023-05-29 18:30:06 +00:00
parent 83e5614f51
commit 5062188fe8
9 changed files with 23 additions and 44 deletions

View File

@ -48,8 +48,6 @@ final class TestingParser
*/
public function parseFileToDecoratedNodes(string $filePath) : array
{
// autoload file
require_once $filePath;
$this->parameterProvider->changeParameter(Option::SOURCE, [$filePath]);
$nodes = $this->rectorParser->parseFile($filePath);
$file = new File($filePath, FileSystem::read($filePath));

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '45a9dd5df8411c31f89e87b8cfcc4348625ce627';
public const PACKAGE_VERSION = '0ea7b49d5839f4dcdf5c9966cf410b3394c5e060';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-05-29 16:17:23';
public const RELEASE_DATE = '2023-05-30 01:26:23';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit5772961641e5d02addc74a63a792d719
class ComposerAutoloaderInit485fe720d2f826b984b00e94627798ce
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit5772961641e5d02addc74a63a792d719
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit5772961641e5d02addc74a63a792d719', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit485fe720d2f826b984b00e94627798ce', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit5772961641e5d02addc74a63a792d719', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit485fe720d2f826b984b00e94627798ce', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5772961641e5d02addc74a63a792d719::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit485fe720d2f826b984b00e94627798ce::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit5772961641e5d02addc74a63a792d719::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit485fe720d2f826b984b00e94627798ce::$files;
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit5772961641e5d02addc74a63a792d719
class ComposerStaticInit485fe720d2f826b984b00e94627798ce
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3084,9 +3084,9 @@ class ComposerStaticInit5772961641e5d02addc74a63a792d719
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit5772961641e5d02addc74a63a792d719::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5772961641e5d02addc74a63a792d719::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5772961641e5d02addc74a63a792d719::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit485fe720d2f826b984b00e94627798ce::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit485fe720d2f826b984b00e94627798ce::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit485fe720d2f826b984b00e94627798ce::$classMap;
}, null, ClassLoader::class);
}

View File

@ -821,17 +821,17 @@
},
{
"name": "phpstan\/phpdoc-parser",
"version": "1.21.1",
"version_normalized": "1.21.1.0",
"version": "1.21.2",
"version_normalized": "1.21.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpdoc-parser.git",
"reference": "e560a3eb5e76b35d6d92377e5abb6887c1c13c95"
"reference": "a8094fafabf0d7c7b7337a9c6496f4d8fbc718f1"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/e560a3eb5e76b35d6d92377e5abb6887c1c13c95",
"reference": "e560a3eb5e76b35d6d92377e5abb6887c1c13c95",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/a8094fafabf0d7c7b7337a9c6496f4d8fbc718f1",
"reference": "a8094fafabf0d7c7b7337a9c6496f4d8fbc718f1",
"shasum": ""
},
"require": {
@ -847,7 +847,7 @@
"phpunit\/phpunit": "^9.5",
"symfony\/process": "^5.2"
},
"time": "2023-05-29T11:55:57+00:00",
"time": "2023-05-29T15:20:08+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -864,7 +864,7 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpdoc-parser\/issues",
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.21.1"
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.21.2"
},
"install-path": "..\/phpstan\/phpdoc-parser"
},

File diff suppressed because one or more lines are too long

View File

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<ruleset name="PHPStan Extensions Coding Standard">
<config name="php_version" value="70200"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="encoding" value="utf-8"/>
<arg name="tab-width" value="4"/>
<arg name="cache" value="tmp/phpcs"/>
<arg value="sp"/>
<rule ref="build-cs/phpcs.xml">
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar"/>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="PHPStan\PhpDocParser"/>
<element key="tests/PHPStan" value="PHPStan\PhpDocParser"/>
</property>
</properties>
</rule>
</ruleset>

View File

@ -595,6 +595,9 @@ final class Printer
$result .= $originalTokens->getContentBetween($pos, $subStartPos);
$mapKey = get_class($node) . '->' . $subNodeName;
$parenthesesNeeded = isset($this->parenthesesMap[$mapKey]) && in_array(get_class($subNode), $this->parenthesesMap[$mapKey], \true);
if ($subNode->getAttribute(Attribute::ORIGINAL_NODE) !== null) {
$parenthesesNeeded = $parenthesesNeeded && !in_array(get_class($subNode->getAttribute(Attribute::ORIGINAL_NODE)), $this->parenthesesMap[$mapKey], \true);
}
$addParentheses = $parenthesesNeeded && !$originalTokens->hasParentheses($subStartPos, $subEndPos);
if ($addParentheses) {
$result .= '(';