Updated Rector to commit 27ac0efdca63485c6e0ee27086cda9bc7b2e6c17

27ac0efdca Remove parent node lookup (#4138)
This commit is contained in:
Tomas Votruba 2023-06-09 16:23:18 +00:00
parent d11bfc6bb9
commit 8135dd31be
9 changed files with 110 additions and 125 deletions

View File

@ -3,9 +3,9 @@
declare (strict_types=1); declare (strict_types=1);
namespace Rector\Php55\Rector\FuncCall; namespace Rector\Php55\Rector\FuncCall;
use PHPStan\Analyser\Scope;
use PhpParser\Node; use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use Rector\Core\Enum\ObjectReference; use Rector\Core\Enum\ObjectReference;
use Rector\Core\Rector\AbstractScopeAwareRector; use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\ValueObject\PhpVersionFeature; use Rector\Core\ValueObject\PhpVersionFeature;

View File

@ -5,15 +5,15 @@ namespace Rector\Php70\Rector\MethodCall;
use PhpParser\Node; use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\Variable; use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassLike; use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\PhpMethodReflection; use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ObjectType;
use Rector\Core\Enum\ObjectReference; use Rector\Core\Enum\ObjectReference;
use Rector\Core\Rector\AbstractRector; use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\Reflection\ReflectionResolver; use Rector\Core\Reflection\ReflectionResolver;
use Rector\Core\ValueObject\PhpVersionFeature; use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\NodeCollector\StaticAnalyzer; use Rector\NodeCollector\StaticAnalyzer;
@ -24,7 +24,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* @changelog https://3v4l.org/rkiSC * @changelog https://3v4l.org/rkiSC
* @see \Rector\Tests\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector\ThisCallOnStaticMethodToStaticCallRectorTest * @see \Rector\Tests\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector\ThisCallOnStaticMethodToStaticCallRectorTest
*/ */
final class ThisCallOnStaticMethodToStaticCallRector extends AbstractRector implements MinPhpVersionInterface final class ThisCallOnStaticMethodToStaticCallRector extends AbstractScopeAwareRector implements MinPhpVersionInterface
{ {
/** /**
* @readonly * @readonly
@ -36,16 +36,10 @@ final class ThisCallOnStaticMethodToStaticCallRector extends AbstractRector impl
* @var \Rector\Core\Reflection\ReflectionResolver * @var \Rector\Core\Reflection\ReflectionResolver
*/ */
private $reflectionResolver; private $reflectionResolver;
/** public function __construct(StaticAnalyzer $staticAnalyzer, ReflectionResolver $reflectionResolver)
* @readonly
* @var \PHPStan\Reflection\ReflectionProvider
*/
private $reflectionProvider;
public function __construct(StaticAnalyzer $staticAnalyzer, ReflectionResolver $reflectionResolver, ReflectionProvider $reflectionProvider)
{ {
$this->staticAnalyzer = $staticAnalyzer; $this->staticAnalyzer = $staticAnalyzer;
$this->reflectionResolver = $reflectionResolver; $this->reflectionResolver = $reflectionResolver;
$this->reflectionProvider = $reflectionProvider;
} }
public function provideMinPhpVersion() : int public function provideMinPhpVersion() : int
{ {
@ -86,59 +80,61 @@ CODE_SAMPLE
*/ */
public function getNodeTypes() : array public function getNodeTypes() : array
{ {
return [MethodCall::class]; return [Class_::class];
} }
/** /**
* @param MethodCall $node * @param Class_ $node
*/ */
public function refactor(Node $node) : ?Node public function refactorWithScope(Node $node, Scope $scope) : ?Node
{ {
if (!$node->var instanceof Variable) { if (!$scope->isInClass()) {
return null;
}
if (!$this->nodeNameResolver->isName($node->var, 'this')) {
return null;
}
if (!$node->name instanceof Identifier) {
return null;
}
$methodName = $this->getName($node->name);
if ($methodName === null) {
return null; return null;
} }
$classReflection = $scope->getClassReflection();
// skip PHPUnit calls, as they accept both self:: and $this-> formats // skip PHPUnit calls, as they accept both self:: and $this-> formats
if ($this->isObjectType($node->var, new ObjectType('PHPUnit\\Framework\\TestCase'))) { if ($classReflection->isSubclassOf('PHPUnit\\Framework\\TestCase')) {
return null; return null;
} }
$classLike = $this->betterNodeFinder->findParentType($node, ClassLike::class); $hasChanged = \false;
if (!$classLike instanceof ClassLike) { $this->traverseNodesWithCallable($node, function (Node $node) use($classReflection, &$hasChanged) : ?StaticCall {
return null; if (!$node instanceof MethodCall) {
return null;
}
if (!$node->var instanceof Variable) {
return null;
}
if (!$this->nodeNameResolver->isName($node->var, 'this')) {
return null;
}
if (!$node->name instanceof Identifier) {
return null;
}
$methodName = $this->getName($node->name);
if ($methodName === null) {
return null;
}
$isStaticMethod = $this->staticAnalyzer->isStaticMethod($classReflection, $methodName);
if (!$isStaticMethod) {
return null;
}
if ($node->isFirstClassCallable()) {
return null;
}
$hasChanged = \true;
$objectReference = $this->resolveClassSelf($classReflection, $node);
return $this->nodeFactory->createStaticCall($objectReference, $methodName, $node->args);
});
if ($hasChanged) {
return $node;
} }
$className = (string) $this->nodeNameResolver->getName($classLike); return null;
if (!$this->reflectionProvider->hasClass($className)) {
return null;
}
$classReflection = $this->reflectionProvider->getClass($className);
$isStaticMethod = $this->staticAnalyzer->isStaticMethod($classReflection, $methodName);
if (!$isStaticMethod) {
return null;
}
if ($node->isFirstClassCallable()) {
return null;
}
$objectReference = $this->resolveClassSelf($node);
return $this->nodeFactory->createStaticCall($objectReference, $methodName, $node->args);
} }
/** /**
* @return ObjectReference::STATIC|ObjectReference::SELF * @return ObjectReference::STATIC|ObjectReference::SELF
*/ */
private function resolveClassSelf(MethodCall $methodCall) : string private function resolveClassSelf(ClassReflection $classReflection, MethodCall $methodCall) : string
{ {
$classLike = $this->betterNodeFinder->findParentType($methodCall, Class_::class); if ($classReflection->isFinalByKeyword()) {
if (!$classLike instanceof Class_) {
return ObjectReference::STATIC;
}
if ($classLike->isFinal()) {
return ObjectReference::SELF; return ObjectReference::SELF;
} }
$methodReflection = $this->reflectionResolver->resolveMethodReflectionFromMethodCall($methodCall); $methodReflection = $this->reflectionResolver->resolveMethodReflectionFromMethodCall($methodCall);

View File

@ -3,12 +3,11 @@
declare (strict_types=1); declare (strict_types=1);
namespace Rector\Php81\Rector\ClassConst; namespace Rector\Php81\Rector\ClassConst;
use PHPStan\Analyser\Scope;
use PhpParser\Node; use PhpParser\Node;
use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassConst;
use PHPStan\Reflection\ReflectionProvider; use PHPStan\Reflection\ReflectionProvider;
use Rector\Core\NodeAnalyzer\ClassAnalyzer; use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature; use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer;
use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Privatization\NodeManipulator\VisibilityManipulator;
@ -20,7 +19,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* *
* @see \Rector\Tests\Php81\Rector\ClassConst\FinalizePublicClassConstantRector\FinalizePublicClassConstantRectorTest * @see \Rector\Tests\Php81\Rector\ClassConst\FinalizePublicClassConstantRector\FinalizePublicClassConstantRectorTest
*/ */
final class FinalizePublicClassConstantRector extends AbstractRector implements MinPhpVersionInterface final class FinalizePublicClassConstantRector extends AbstractScopeAwareRector implements MinPhpVersionInterface
{ {
/** /**
* @readonly * @readonly
@ -32,21 +31,15 @@ final class FinalizePublicClassConstantRector extends AbstractRector implements
* @var \PHPStan\Reflection\ReflectionProvider * @var \PHPStan\Reflection\ReflectionProvider
*/ */
private $reflectionProvider; private $reflectionProvider;
/**
* @readonly
* @var \Rector\Core\NodeAnalyzer\ClassAnalyzer
*/
private $classAnalyzer;
/** /**
* @readonly * @readonly
* @var \Rector\Privatization\NodeManipulator\VisibilityManipulator * @var \Rector\Privatization\NodeManipulator\VisibilityManipulator
*/ */
private $visibilityManipulator; private $visibilityManipulator;
public function __construct(FamilyRelationsAnalyzer $familyRelationsAnalyzer, ReflectionProvider $reflectionProvider, ClassAnalyzer $classAnalyzer, VisibilityManipulator $visibilityManipulator) public function __construct(FamilyRelationsAnalyzer $familyRelationsAnalyzer, ReflectionProvider $reflectionProvider, VisibilityManipulator $visibilityManipulator)
{ {
$this->familyRelationsAnalyzer = $familyRelationsAnalyzer; $this->familyRelationsAnalyzer = $familyRelationsAnalyzer;
$this->reflectionProvider = $reflectionProvider; $this->reflectionProvider = $reflectionProvider;
$this->classAnalyzer = $classAnalyzer;
$this->visibilityManipulator = $visibilityManipulator; $this->visibilityManipulator = $visibilityManipulator;
} }
public function getRuleDefinition() : RuleDefinition public function getRuleDefinition() : RuleDefinition
@ -70,34 +63,41 @@ CODE_SAMPLE
*/ */
public function getNodeTypes() : array public function getNodeTypes() : array
{ {
return [ClassConst::class]; return [Class_::class];
} }
/** /**
* @param ClassConst $node * @param Class_ $node
*/ */
public function refactor(Node $node) : ?Node public function refactorWithScope(Node $node, Scope $scope) : ?Node
{ {
$class = $this->betterNodeFinder->findParentType($node, Class_::class);
if (!$class instanceof Class_) {
return null;
}
if ($class->isFinal()) {
return null;
}
if (!$node->isPublic()) {
return null;
}
if ($node->isFinal()) { if ($node->isFinal()) {
return null; return null;
} }
if ($this->classAnalyzer->isAnonymousClass($class)) { if (!$scope->isInClass()) {
return null; return null;
} }
if ($this->isClassHasChildren($class)) { $classReflection = $scope->getClassReflection();
if ($classReflection->isAnonymous()) {
return null; return null;
} }
$this->visibilityManipulator->makeFinal($node); $hasChanged = \false;
return $node; foreach ($node->getConstants() as $classConst) {
if (!$classConst->isPublic()) {
continue;
}
if ($classConst->isFinal()) {
continue;
}
if ($this->isClassHasChildren($node)) {
continue;
}
$hasChanged = \true;
$this->visibilityManipulator->makeFinal($classConst);
}
if ($hasChanged) {
return $node;
}
return null;
} }
public function provideMinPhpVersion() : int public function provideMinPhpVersion() : int
{ {

View File

@ -14,13 +14,13 @@ use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\NullableType; use PhpParser\Node\NullableType;
use PhpParser\Node\Param; use PhpParser\Node\Param;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\If_;
use PhpParser\Node\UnionType; use PhpParser\Node\UnionType;
use PHPStan\Analyser\Scope; use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use Rector\Core\Rector\AbstractScopeAwareRector; use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\Reflection\ReflectionResolver; use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser; use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
use Rector\TypeDeclaration\NodeAnalyzer\CallerParamMatcher; use Rector\TypeDeclaration\NodeAnalyzer\CallerParamMatcher;
use Rector\VendorLocker\ParentClassMethodTypeOverrideGuard; use Rector\VendorLocker\ParentClassMethodTypeOverrideGuard;
@ -46,17 +46,11 @@ final class ParamTypeByMethodCallTypeRector extends AbstractScopeAwareRector
* @var \Rector\VendorLocker\ParentClassMethodTypeOverrideGuard * @var \Rector\VendorLocker\ParentClassMethodTypeOverrideGuard
*/ */
private $parentClassMethodTypeOverrideGuard; private $parentClassMethodTypeOverrideGuard;
/** public function __construct(CallerParamMatcher $callerParamMatcher, SimpleCallableNodeTraverser $simpleCallableNodeTraverser, ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard)
* @readonly
* @var \Rector\Core\Reflection\ReflectionResolver
*/
private $reflectionResolver;
public function __construct(CallerParamMatcher $callerParamMatcher, SimpleCallableNodeTraverser $simpleCallableNodeTraverser, ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard, ReflectionResolver $reflectionResolver)
{ {
$this->callerParamMatcher = $callerParamMatcher; $this->callerParamMatcher = $callerParamMatcher;
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
$this->parentClassMethodTypeOverrideGuard = $parentClassMethodTypeOverrideGuard; $this->parentClassMethodTypeOverrideGuard = $parentClassMethodTypeOverrideGuard;
$this->reflectionResolver = $reflectionResolver;
} }
public function getRuleDefinition() : RuleDefinition public function getRuleDefinition() : RuleDefinition
{ {
@ -109,30 +103,32 @@ CODE_SAMPLE
*/ */
public function getNodeTypes() : array public function getNodeTypes() : array
{ {
return [ClassMethod::class]; return [Class_::class];
} }
/** /**
* @param ClassMethod $node * @param Class_ $node
*/ */
public function refactorWithScope(Node $node, Scope $scope) : ?Node public function refactorWithScope(Node $node, Scope $scope) : ?Node
{ {
if ($this->shouldSkipClassMethod($node)) {
return null;
}
/** @var array<StaticCall|MethodCall|FuncCall> $callers */
$callers = $this->betterNodeFinder->findInstancesOf((array) $node->stmts, [StaticCall::class, MethodCall::class, FuncCall::class]);
$hasChanged = \false; $hasChanged = \false;
foreach ($node->params as $param) { foreach ($node->getMethods() as $classMethod) {
if ($this->shouldSkipParam($param, $node)) { if ($this->shouldSkipClassMethod($classMethod)) {
continue; continue;
} }
foreach ($callers as $caller) { /** @var array<StaticCall|MethodCall|FuncCall> $callers */
$paramType = $this->callerParamMatcher->matchCallParamType($caller, $param, $scope); $callers = $this->betterNodeFinder->findInstancesOf($classMethod, [StaticCall::class, MethodCall::class, FuncCall::class]);
if ($paramType === null) { foreach ($classMethod->params as $param) {
if ($this->shouldSkipParam($param, $classMethod)) {
continue; continue;
} }
$this->mirrorParamType($param, $paramType); foreach ($callers as $caller) {
$hasChanged = \true; $paramType = $this->callerParamMatcher->matchCallParamType($caller, $param, $scope);
if ($paramType === null) {
continue;
}
$this->mirrorParamType($param, $paramType);
$hasChanged = \true;
}
} }
} }
if ($hasChanged) { if ($hasChanged) {
@ -145,14 +141,7 @@ CODE_SAMPLE
if ($classMethod->params === []) { if ($classMethod->params === []) {
return \true; return \true;
} }
if ($this->parentClassMethodTypeOverrideGuard->hasParentClassMethod($classMethod)) { return $this->parentClassMethodTypeOverrideGuard->hasParentClassMethod($classMethod);
return \true;
}
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
if (!$classReflection instanceof ClassReflection) {
return \true;
}
return !$classReflection->isClass();
} }
/** /**
* @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\ComplexType $paramType * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\ComplexType $paramType
@ -162,8 +151,8 @@ CODE_SAMPLE
// mimic type // mimic type
$newParamType = $paramType; $newParamType = $paramType;
$this->simpleCallableNodeTraverser->traverseNodesWithCallable($newParamType, static function (Node $node) { $this->simpleCallableNodeTraverser->traverseNodesWithCallable($newParamType, static function (Node $node) {
// original attributes have to removed to avoid tokens crashing from origin positions // original node has to removed to avoid tokens crashing from origin positions
$node->setAttributes([]); $node->setAttribute(AttributeKey::ORIGINAL_NODE, null);
return null; return null;
}); });
$decoratedParam->type = $newParamType; $decoratedParam->type = $newParamType;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = 'af780c8f07bfe6fcf011789979369f03e279db44'; public const PACKAGE_VERSION = '27ac0efdca63485c6e0ee27086cda9bc7b2e6c17';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2023-06-09 16:54:47'; public const RELEASE_DATE = '2023-06-09 16:18:11';
/** /**
* @var int * @var int
*/ */

View File

@ -15,7 +15,7 @@ final class RectorKernel
/** /**
* @var string * @var string
*/ */
private const CACHE_KEY = 'v83'; private const CACHE_KEY = 'v84';
/** /**
* @var \Symfony\Component\DependencyInjection\ContainerInterface|null * @var \Symfony\Component\DependencyInjection\ContainerInterface|null
*/ */

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit45c6c7287d901d58b750167655728442::getLoader(); return ComposerAutoloaderInitdbb9ba42e4c01bc09b28ae467199df0b::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit45c6c7287d901d58b750167655728442 class ComposerAutoloaderInitdbb9ba42e4c01bc09b28ae467199df0b
{ {
private static $loader; private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit45c6c7287d901d58b750167655728442
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit45c6c7287d901d58b750167655728442', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitdbb9ba42e4c01bc09b28ae467199df0b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit45c6c7287d901d58b750167655728442', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitdbb9ba42e4c01bc09b28ae467199df0b', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit45c6c7287d901d58b750167655728442::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b::getInitializer($loader));
$loader->setClassMapAuthoritative(true); $loader->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit45c6c7287d901d58b750167655728442::$files; $filesToLoad = \Composer\Autoload\ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit45c6c7287d901d58b750167655728442 class ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b
{ {
public static $files = array ( public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3128,9 +3128,9 @@ class ComposerStaticInit45c6c7287d901d58b750167655728442
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit45c6c7287d901d58b750167655728442::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit45c6c7287d901d58b750167655728442::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit45c6c7287d901d58b750167655728442::$classMap; $loader->classMap = ComposerStaticInitdbb9ba42e4c01bc09b28ae467199df0b::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }