mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 20:00:50 +00:00
Updated Rector to commit 00b6703cdc1c7dde6a568b1121fb7ba5c2dc06a7
00b6703cdc
make the link clickable (#3457)
This commit is contained in:
parent
c3c4fb3825
commit
b1ccc29dac
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0.15.20';
|
||||
public const PACKAGE_VERSION = '00b6703cdc1c7dde6a568b1121fb7ba5c2dc06a7';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-03-04 10:11:40';
|
||||
public const RELEASE_DATE = '2023-03-05 20:02:36';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -66,9 +66,10 @@ final class SetupCICommand extends Command
|
|||
$this->symfonyStyle->note('The "rector.yaml" workflow was added');
|
||||
$this->symfonyStyle->newLine();
|
||||
$this->symfonyStyle->title('2 steps more to run you Github Action:');
|
||||
$this->symfonyStyle->writeln('1) Generate new Github Token here:' . \PHP_EOL . 'https://github.com/settings/tokens/new');
|
||||
$this->symfonyStyle->writeln('1) Generate new Github Token here:' . \PHP_EOL . $this->createClickableLink('https://github.com/settings/tokens/new'));
|
||||
$this->symfonyStyle->newLine();
|
||||
$this->symfonyStyle->writeln('2) Add it to your repository secrets under "GITHUB_TOKE" name:' . \PHP_EOL . \sprintf('https://github.com/%s/settings/secrets/actions/new', $currentRepository));
|
||||
$repositoryUrl = \sprintf('https://github.com/%s/settings/secrets/actions/new', $currentRepository);
|
||||
$this->symfonyStyle->writeln('2) Add it to your repository secrets under "GITHUB_TOKE" name:' . \PHP_EOL . $this->createClickableLink($repositoryUrl));
|
||||
$this->symfonyStyle->newLine();
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
@ -91,4 +92,8 @@ final class SetupCICommand extends Command
|
|||
$match = Strings::match($output, self::GITHUB_REPOSITORY_REGEX);
|
||||
return $match['repository_name'] ?? null;
|
||||
}
|
||||
private function createClickableLink(string $url) : string
|
||||
{
|
||||
return \sprintf('<href=%s>%s</>', $url, $url);
|
||||
}
|
||||
}
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite5ade87cb10db67b50ce4d9f0db1f410::getLoader();
|
||||
return ComposerAutoloaderInitae2ccdec9e1c7461e5c0c857085843f0::getLoader();
|
||||
|
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInite5ade87cb10db67b50ce4d9f0db1f410
|
||||
class ComposerAutoloaderInitae2ccdec9e1c7461e5c0c857085843f0
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInite5ade87cb10db67b50ce4d9f0db1f410
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite5ade87cb10db67b50ce4d9f0db1f410', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitae2ccdec9e1c7461e5c0c857085843f0', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite5ade87cb10db67b50ce4d9f0db1f410', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitae2ccdec9e1c7461e5c0c857085843f0', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410
|
||||
class ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3133,9 +3133,9 @@ class ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite5ade87cb10db67b50ce4d9f0db1f410::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitae2ccdec9e1c7461e5c0c857085843f0::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
|
@ -664,17 +664,17 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic\/php-parser",
|
||||
"version": "v4.15.3",
|
||||
"version_normalized": "4.15.3.0",
|
||||
"version": "v4.15.4",
|
||||
"version_normalized": "4.15.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/nikic\/PHP-Parser.git",
|
||||
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
|
||||
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
|
||||
"url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -685,7 +685,7 @@
|
|||
"ircmaxell\/php-yacc": "^0.0.7",
|
||||
"phpunit\/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
|
||||
},
|
||||
"time": "2023-01-16T22:05:37+00:00",
|
||||
"time": "2023-03-05T19:49:14+00:00",
|
||||
"bin": [
|
||||
"bin\/php-parse"
|
||||
],
|
||||
|
@ -734,7 +734,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/nikic\/PHP-Parser\/issues",
|
||||
"source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.15.3"
|
||||
"source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.15.4"
|
||||
},
|
||||
"install-path": "..\/nikic\/php-parser"
|
||||
},
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
6
vendor/nikic/php-parser/grammar/php7.y
vendored
6
vendor/nikic/php-parser/grammar/php7.y
vendored
|
@ -518,7 +518,8 @@ new_elseif_list:
|
|||
;
|
||||
|
||||
new_elseif:
|
||||
T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; }
|
||||
T_ELSEIF '(' expr ')' ':' inner_statement_list
|
||||
{ $$ = Stmt\ElseIf_[$3, $6]; $this->fixupAlternativeElse($$); }
|
||||
;
|
||||
|
||||
else_single:
|
||||
|
@ -528,7 +529,8 @@ else_single:
|
|||
|
||||
new_else_single:
|
||||
/* empty */ { $$ = null; }
|
||||
| T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; }
|
||||
| T_ELSE ':' inner_statement_list
|
||||
{ $$ = Stmt\Else_[$3]; $this->fixupAlternativeElse($$); }
|
||||
;
|
||||
|
||||
foreach_variable:
|
||||
|
|
|
@ -669,6 +669,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
|||
$this->semValue = $this->semStack[$stackPos - (2 - 1)];
|
||||
}, 266 => function ($stackPos) {
|
||||
$this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 6)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
|
||||
$this->fixupAlternativeElse($this->semValue);
|
||||
}, 267 => function ($stackPos) {
|
||||
$this->semValue = null;
|
||||
}, 268 => function ($stackPos) {
|
||||
|
@ -677,6 +678,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
|||
$this->semValue = null;
|
||||
}, 270 => function ($stackPos) {
|
||||
$this->semValue = new Stmt\Else_($this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
|
||||
$this->fixupAlternativeElse($this->semValue);
|
||||
}, 271 => function ($stackPos) {
|
||||
$this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
|
||||
}, 272 => function ($stackPos) {
|
||||
|
|
|
@ -17,9 +17,12 @@ use PhpParser\Node\Scalar\String_;
|
|||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassConst;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Else_;
|
||||
use PhpParser\Node\Stmt\ElseIf_;
|
||||
use PhpParser\Node\Stmt\Enum_;
|
||||
use PhpParser\Node\Stmt\Interface_;
|
||||
use PhpParser\Node\Stmt\Namespace_;
|
||||
use PhpParser\Node\Stmt\Nop;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PhpParser\Node\Stmt\TryCatch;
|
||||
use PhpParser\Node\Stmt\UseUse;
|
||||
|
@ -719,6 +722,24 @@ abstract class ParserAbstract implements \PhpParser\Parser
|
|||
}
|
||||
return $attributes;
|
||||
}
|
||||
/** @param ElseIf_|Else_ $node */
|
||||
protected function fixupAlternativeElse($node)
|
||||
{
|
||||
// Make sure a trailing nop statement carrying comments is part of the node.
|
||||
$numStmts = \count($node->stmts);
|
||||
if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) {
|
||||
$nopAttrs = $node->stmts[$numStmts - 1]->getAttributes();
|
||||
if (isset($nopAttrs['endLine'])) {
|
||||
$node->setAttribute('endLine', $nopAttrs['endLine']);
|
||||
}
|
||||
if (isset($nopAttrs['endFilePos'])) {
|
||||
$node->setAttribute('endFilePos', $nopAttrs['endFilePos']);
|
||||
}
|
||||
if (isset($nopAttrs['endTokenPos'])) {
|
||||
$node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected function checkClassModifier($a, $b, $modifierPos)
|
||||
{
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user