Skip to content

Commit

Permalink
Updated Rector to commit 763bce6
Browse files Browse the repository at this point in the history
rectorphp/rector-src@763bce6 [PHP 8.0] Add class const reference to PhpAttributeGroupFactory (#122)
  • Loading branch information
TomasVotruba committed May 29, 2021
1 parent d009bac commit eb050eb
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
10 changes: 9 additions & 1 deletion packages/PhpAttribute/Printer/PhpAttributeGroupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
use PhpParser\Node\Arg;
use PhpParser\Node\Attribute;
use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
Expand Down Expand Up @@ -71,7 +74,7 @@ private function isArrayArguments(array $items) : bool
}
/**
* @param mixed $value
* @return bool|float|int|string|array<mixed>
* @return bool|float|int|string|array<mixed>|Expr
*/
private function normalizeNodeValue($value)
{
Expand All @@ -95,6 +98,11 @@ private function normalizeNodeValue($value)
return $this->normalizeNodeValue($node);
}, $value->getValuesWithExplicitSilentAndWithoutQuotes());
}
if (\is_string($value) && \strpos($value, '::') !== \false) {
// class const fetch
[$class, $constant] = \explode('::', $value);
return new \PhpParser\Node\Expr\ClassConstFetch(new \PhpParser\Node\Name($class), $constant);
}
if ($value instanceof \PHPStan\PhpDocParser\Ast\Node) {
return (string) $value;
}
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 = '4c5f678ca4c1d42846a80d8677718d3ac88026c9';
public const PACKAGE_VERSION = '763bce6c57f4ad1b3a6c421ce0a56d9219f1c9e2';
/**
* @var string
*/
public const RELEASE_DATE = '2021-05-29 19:06:26';
public const RELEASE_DATE = '2021-05-29 22:02:52';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210529\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 ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84::getLoader();
return ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f::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 ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84
class ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f
{
private static $loader;

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

spl_autoload_register(array('ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f', '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\ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f::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\ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireb03907ce8f77d8a6e3d4f5730e144d84($fileIdentifier, $file);
composerRequire337f58b2e3b250842c3babd1f071fc6f($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequireb03907ce8f77d8a6e3d4f5730e144d84($fileIdentifier, $file)
function composerRequire337f58b2e3b250842c3babd1f071fc6f($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 ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84
class ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
Expand Down Expand Up @@ -3824,9 +3824,9 @@ class ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb03907ce8f77d8a6e3d4f5730e144d84::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit337f58b2e3b250842c3babd1f071fc6f::$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('RectorPrefix20210529\CheckoutEntityFactory');
}
if (!class_exists('ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84', false) && !interface_exists('ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84', false) && !trait_exists('ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84', false)) {
spl_autoload_call('RectorPrefix20210529\ComposerAutoloaderInitb03907ce8f77d8a6e3d4f5730e144d84');
if (!class_exists('ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f', false) && !interface_exists('ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f', false) && !trait_exists('ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f', false)) {
spl_autoload_call('RectorPrefix20210529\ComposerAutoloaderInit337f58b2e3b250842c3babd1f071fc6f');
}
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
spl_autoload_call('RectorPrefix20210529\Doctrine\Inflector\Inflector');
Expand Down Expand Up @@ -3320,9 +3320,9 @@ function print_node() {
return \RectorPrefix20210529\print_node(...func_get_args());
}
}
if (!function_exists('composerRequireb03907ce8f77d8a6e3d4f5730e144d84')) {
function composerRequireb03907ce8f77d8a6e3d4f5730e144d84() {
return \RectorPrefix20210529\composerRequireb03907ce8f77d8a6e3d4f5730e144d84(...func_get_args());
if (!function_exists('composerRequire337f58b2e3b250842c3babd1f071fc6f')) {
function composerRequire337f58b2e3b250842c3babd1f071fc6f() {
return \RectorPrefix20210529\composerRequire337f58b2e3b250842c3babd1f071fc6f(...func_get_args());
}
}
if (!function_exists('parseArgs')) {
Expand Down

0 comments on commit eb050eb

Please sign in to comment.