mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-04 23:52:28 +02:00
Updated Rector to commit a653146486eea313a569bd84a19e6ebaec7015d9
a653146486
avoid including copiler extension stub
This commit is contained in:
parent
88bf1e0a97
commit
ff810186aa
@ -96,6 +96,9 @@ CODE_SAMPLE
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?Node
|
||||
{
|
||||
if ($this->shouldSkipTwigExtension($scope)) {
|
||||
return null;
|
||||
}
|
||||
$arrayCallable = $this->arrayCallableMethodMatcher->match($node, $scope);
|
||||
if (!$arrayCallable instanceof ArrayCallable) {
|
||||
return null;
|
||||
@ -106,4 +109,12 @@ CODE_SAMPLE
|
||||
}
|
||||
return $this->anonymousFunctionFactory->createFromPhpMethodReflection($phpMethodReflection, $arrayCallable->getCallerExpr());
|
||||
}
|
||||
private function shouldSkipTwigExtension(Scope $scope) : bool
|
||||
{
|
||||
if (!$scope->isInClass()) {
|
||||
return \false;
|
||||
}
|
||||
$classReflection = $scope->getClassReflection();
|
||||
return $classReflection->isSubclassOf('Twig\\Extension\\ExtensionInterface');
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'b99b82abd47885409542fd867546a0e301e45400';
|
||||
public const PACKAGE_VERSION = 'a653146486eea313a569bd84a19e6ebaec7015d9';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-27 14:55:25';
|
||||
public const RELEASE_DATE = '2023-06-27 11:00:04';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
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 ComposerAutoloaderInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::getLoader();
|
||||
return ComposerAutoloaderInitbfb7ecf9710a4af1b98d0446d332a80b::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 ComposerAutoloaderInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c
|
||||
class ComposerAutoloaderInitbfb7ecf9710a4af1b98d0446d332a80b
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitbfb7ecf9710a4af1b98d0446d332a80b', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitbfb7ecf9710a4af1b98d0446d332a80b', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b::$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 ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c
|
||||
class ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3098,9 +3098,9 @@ class ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitb0827cf52ae98d0aa5dbd8dd1ffb4c7c::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitbfb7ecf9710a4af1b98d0446d332a80b::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user