Skip to content

Commit

Permalink
Updated Rector to commit 21f33de2b90c0e63d42c3ebebef7cf4415191a21
Browse files Browse the repository at this point in the history
rectorphp/rector-src@21f33de Recreate to exact Expr node instead of printing when possible on AddParamBasedOnParentClassMethodRector take 2 (#4842)
  • Loading branch information
TomasVotruba committed Aug 24, 2023
1 parent 6da4ac4 commit b19f667
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,19 @@ private function processReplaceClassMethodParams(ClassMethod $node, ClassMethod
private function resolveParamDefault(Expr $expr) : Expr
{
// re-create to avoid TokenStream error
if ($expr instanceof String_ && $expr->value === '') {
return new String_($expr->value);
if ($expr instanceof String_) {
return new String_($expr->value, [AttributeKey::KIND => $expr->getAttribute(AttributeKey::KIND)]);
}
if ($expr instanceof LNumber) {
return new LNumber($expr->value);
}
if ($expr instanceof DNumber) {
return new DNumber($expr->value);
}
$printParamDefault = $this->betterStandardPrinter->print($expr);
if ($printParamDefault === '[]') {
return new Array_([]);
if ($expr instanceof Array_ && $expr->items === []) {
return new Array_($expr->items, [AttributeKey::KIND => $expr->getAttribute(AttributeKey::KIND)]);
}
$printParamDefault = $this->betterStandardPrinter->print($expr);
return new ConstFetch(new Name($printParamDefault));
}
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '295156cba171ce9685cd26e73490fd7d7b2001b1';
public const PACKAGE_VERSION = '21f33de2b90c0e63d42c3ebebef7cf4415191a21';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-24 14:15:31';
public const RELEASE_DATE = '2023-08-24 17:24:57';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

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

return ComposerAutoloaderInit8671783b2c46a0862733c9e04557a6cf::getLoader();
return ComposerAutoloaderInit97d2a153d27d81819b1dac0daacf982b::getLoader();
10 changes: 5 additions & 5 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 ComposerAutoloaderInit8671783b2c46a0862733c9e04557a6cf
class ComposerAutoloaderInit97d2a153d27d81819b1dac0daacf982b
{
private static $loader;

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

spl_autoload_register(array('ComposerAutoloaderInit8671783b2c46a0862733c9e04557a6cf', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit97d2a153d27d81819b1dac0daacf982b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit8671783b2c46a0862733c9e04557a6cf', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit97d2a153d27d81819b1dac0daacf982b', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit8671783b2c46a0862733c9e04557a6cf::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit97d2a153d27d81819b1dac0daacf982b::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit8671783b2c46a0862733c9e04557a6cf::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit97d2a153d27d81819b1dac0daacf982b::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
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 ComposerStaticInit8671783b2c46a0862733c9e04557a6cf
class ComposerStaticInit97d2a153d27d81819b1dac0daacf982b
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -2609,9 +2609,9 @@ class ComposerStaticInit8671783b2c46a0862733c9e04557a6cf
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit8671783b2c46a0862733c9e04557a6cf::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8671783b2c46a0862733c9e04557a6cf::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8671783b2c46a0862733c9e04557a6cf::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit97d2a153d27d81819b1dac0daacf982b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit97d2a153d27d81819b1dac0daacf982b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit97d2a153d27d81819b1dac0daacf982b::$classMap;

}, null, ClassLoader::class);
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1812,12 +1812,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "9a58a849b3cc586c1a1654bfe1df9541cd2f4fd7"
"reference": "ae036b6c4f50cfd253ea527c83c8fc6819e8e1e7"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/9a58a849b3cc586c1a1654bfe1df9541cd2f4fd7",
"reference": "9a58a849b3cc586c1a1654bfe1df9541cd2f4fd7",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/ae036b6c4f50cfd253ea527c83c8fc6819e8e1e7",
"reference": "ae036b6c4f50cfd253ea527c83c8fc6819e8e1e7",
"shasum": ""
},
"require": {
Expand All @@ -1831,7 +1831,7 @@
"phpunit\/phpunit": "^10.1",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-generator": "^0.6",
"rector\/rector-src": "dev-phpstan-config",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "^11.2",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/phpstan-extensions": "^11.2",
Expand All @@ -1843,7 +1843,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-08-24T07:10:27+00:00",
"time": "2023-08-24T07:17:26+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/rector/extension-installer/src/GeneratedConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('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 c0ab738'), '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 9a58a84'), '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 e6dd6a0'), '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 ef9424a'));
public const EXTENSIONS = array('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 c0ab738'), '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 ae036b6'), '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 e6dd6a0'), '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 ef9424a'));
private function __construct()
{
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/rector/rector-downgrade-php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"phpunit\/phpunit": "^10.1",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-generator": "^0.6",
"rector\/rector-src": "dev-phpstan-config",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "^11.2",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/phpstan-extensions": "^11.2",
Expand Down

0 comments on commit b19f667

Please sign in to comment.