Skip to content

Commit

Permalink
Updated Rector to commit 3157491
Browse files Browse the repository at this point in the history
rectorphp/rector-src@3157491 [PHP 8.0] Fix next attributes item with comma and new line (#215)
  • Loading branch information
TomasVotruba committed Jun 13, 2021
1 parent 069fd6e commit df68ed4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,22 @@ public function parseCurlyArray(\Rector\BetterPhpDocParser\ValueObject\Parser\Be
// 2nd+ item
while ($tokenIterator->isCurrentTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_COMMA)) {
// optional trailing comma
if ($tokenIterator->isNextTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
$tokenIterator->consumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_COMMA);
$tokenIterator->tryConsumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_PHPDOC_EOL);
if ($tokenIterator->isCurrentTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
break;
}
$tokenIterator->consumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_COMMA);
$values[] = $this->resolveArrayItem($tokenIterator);
if ($tokenIterator->isNextTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
break;
}
// skip newlines
$tokenIterator->tryConsumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_PHPDOC_EOL);
}
$tokenIterator->tryConsumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_PHPDOC_EOL);
// special case for nested doctrine annotations
if (!$tokenIterator->isCurrentTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_PARENTHESES)) {
$tokenIterator->consumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET);
$tokenIterator->tryConsumeTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET);
}
return $this->createArrayFromValues($values);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
* @var string
* @see https://regex101.com/r/H6JjOG/1
*/
private const UNQUOTED_VALUE_REGEX = '#"(?<content>.*?)"#';
private const UNQUOTED_VALUE_REGEX = '#("|\')(?<content>.*?)("|\')#';
/**
* @var bool
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '47c437302c3d564208ec2acf603431de61dff22f';
public const PACKAGE_VERSION = '3157491c7808b8ca110ada5a9a5cd64206972221';
/**
* @var string
*/
public const RELEASE_DATE = '2021-06-13 20:15:26';
public const RELEASE_DATE = '2021-06-13 22:44:36';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210613\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

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

return ComposerAutoloaderInita728988720745f10cf29e641d6cdae46::getLoader();
return ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947::getLoader();
14 changes: 7 additions & 7 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 ComposerAutoloaderInita728988720745f10cf29e641d6cdae46
class ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947
{
private static $loader;

Expand All @@ -22,15 +22,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInita728988720745f10cf29e641d6cdae46', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInita728988720745f10cf29e641d6cdae46', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947', '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\ComposerStaticInita728988720745f10cf29e641d6cdae46::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInita4fb4b42a8038d346c144624076ff947::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
Expand All @@ -42,19 +42,19 @@ public static function getLoader()
$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInita728988720745f10cf29e641d6cdae46::$files;
$includeFiles = Composer\Autoload\ComposerStaticInita4fb4b42a8038d346c144624076ff947::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirea728988720745f10cf29e641d6cdae46($fileIdentifier, $file);
composerRequirea4fb4b42a8038d346c144624076ff947($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequirea728988720745f10cf29e641d6cdae46($fileIdentifier, $file)
function composerRequirea4fb4b42a8038d346c144624076ff947($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
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 ComposerStaticInita728988720745f10cf29e641d6cdae46
class ComposerStaticInita4fb4b42a8038d346c144624076ff947
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
Expand Down Expand Up @@ -3863,9 +3863,9 @@ class ComposerStaticInita728988720745f10cf29e641d6cdae46
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInita728988720745f10cf29e641d6cdae46::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita728988720745f10cf29e641d6cdae46::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita728988720745f10cf29e641d6cdae46::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita4fb4b42a8038d346c144624076ff947::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita4fb4b42a8038d346c144624076ff947::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita4fb4b42a8038d346c144624076ff947::$classMap;

}, null, ClassLoader::class);
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/scoper-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
if (!class_exists('CheckoutEntityFactory', false) && !interface_exists('CheckoutEntityFactory', false) && !trait_exists('CheckoutEntityFactory', false)) {
spl_autoload_call('RectorPrefix20210613\CheckoutEntityFactory');
}
if (!class_exists('ComposerAutoloaderInita728988720745f10cf29e641d6cdae46', false) && !interface_exists('ComposerAutoloaderInita728988720745f10cf29e641d6cdae46', false) && !trait_exists('ComposerAutoloaderInita728988720745f10cf29e641d6cdae46', false)) {
spl_autoload_call('RectorPrefix20210613\ComposerAutoloaderInita728988720745f10cf29e641d6cdae46');
if (!class_exists('ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947', false) && !interface_exists('ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947', false) && !trait_exists('ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947', false)) {
spl_autoload_call('RectorPrefix20210613\ComposerAutoloaderInita4fb4b42a8038d346c144624076ff947');
}
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
spl_autoload_call('RectorPrefix20210613\Doctrine\Inflector\Inflector');
Expand Down Expand Up @@ -3323,9 +3323,9 @@ function print_node() {
return \RectorPrefix20210613\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirea728988720745f10cf29e641d6cdae46')) {
function composerRequirea728988720745f10cf29e641d6cdae46() {
return \RectorPrefix20210613\composerRequirea728988720745f10cf29e641d6cdae46(...func_get_args());
if (!function_exists('composerRequirea4fb4b42a8038d346c144624076ff947')) {
function composerRequirea4fb4b42a8038d346c144624076ff947() {
return \RectorPrefix20210613\composerRequirea4fb4b42a8038d346c144624076ff947(...func_get_args());
}
}
if (!function_exists('parseArgs')) {
Expand Down

0 comments on commit df68ed4

Please sign in to comment.