mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 1d8b12dc022dc4ff9c9c26a2fc1ea409027d271b
1d8b12dc02
Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here (#4057)
This commit is contained in:
parent
12850de413
commit
936365906d
|
@ -42,8 +42,6 @@ use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\Dy
|
|||
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
use Rector\PhpDocParser\PhpParser\SmartPhpParser;
|
||||
use Rector\PhpDocParser\PhpParser\SmartPhpParserFactory;
|
||||
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
||||
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
||||
use Rector\Utils\Command\MissingInSetCommand;
|
||||
use Rector\Utils\Command\OutsideAnySetCommand;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Application;
|
||||
|
@ -87,8 +85,6 @@ return static function (RectorConfig $rectorConfig) : void {
|
|||
__DIR__ . '/../packages/NodeTypeResolver/Reflection/BetterReflection/RectorBetterReflectionSourceLocatorFactory.php',
|
||||
__DIR__ . '/../packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php',
|
||||
]);
|
||||
// psr-4
|
||||
$services->alias(PSR4AutoloadNamespaceMatcherInterface::class, PSR4NamespaceMatcher::class);
|
||||
$services->load('Rector\\', __DIR__ . '/../rules')->exclude([__DIR__ . '/../rules/*/ValueObject/*', __DIR__ . '/../rules/*/Rector/*', __DIR__ . '/../rules/*/Contract/*', __DIR__ . '/../rules/*/Exception/*', __DIR__ . '/../rules/*/Enum/*']);
|
||||
$services->set(Filesystem::class);
|
||||
// use faster in-memory cache in CI.
|
||||
|
|
|
@ -4,9 +4,7 @@ declare (strict_types=1);
|
|||
namespace RectorPrefix202306;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
|
||||
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
|
||||
$rectorConfig->rule(MultipleClassFileToPsr4ClassesRector::class);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# 391 Rules Overview
|
||||
# 390 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
- [Naming](#naming) (6)
|
||||
|
||||
- [PSR4](#psr4) (2)
|
||||
- [PSR4](#psr4) (1)
|
||||
|
||||
- [Php52](#php52) (2)
|
||||
|
||||
|
@ -4110,38 +4110,6 @@ Change multiple classes in one file to standalone PSR-4 classes.
|
|||
|
||||
<br>
|
||||
|
||||
### NormalizeNamespaceByPSR4ComposerAutoloadRector
|
||||
|
||||
Adds namespace to namespace-less files or correct namespace to match PSR-4 in `composer.json` autoload section. Run with combination with "Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector"
|
||||
|
||||
- class: [`Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector`](../rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php)
|
||||
|
||||
- with `composer.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\CustomNamespace\\": "src"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
// src/SomeClass.php
|
||||
|
||||
+namespace App\CustomNamespace;
|
||||
+
|
||||
class SomeClass
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Php52
|
||||
|
||||
### ContinueToBreakInSwitchRector
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\Composer;
|
||||
|
||||
use RectorPrefix202306\Nette\Utils\FileSystem;
|
||||
use RectorPrefix202306\Nette\Utils\Json;
|
||||
final class PSR4AutoloadPathsProvider
|
||||
{
|
||||
/**
|
||||
* @var array<string, array<string, string>>
|
||||
*/
|
||||
private $cachedComposerJsonPSR4AutoloadPaths = [];
|
||||
/**
|
||||
* @return array<string, string|string[]>
|
||||
*/
|
||||
public function provide() : array
|
||||
{
|
||||
if ($this->cachedComposerJsonPSR4AutoloadPaths !== []) {
|
||||
return $this->cachedComposerJsonPSR4AutoloadPaths;
|
||||
}
|
||||
$fileContents = FileSystem::read($this->getComposerJsonPath());
|
||||
$composerJson = Json::decode($fileContents, Json::FORCE_ARRAY);
|
||||
$psr4Autoloads = \array_merge($composerJson['autoload']['psr-4'] ?? [], $composerJson['autoload-dev']['psr-4'] ?? []);
|
||||
$this->cachedComposerJsonPSR4AutoloadPaths = $this->removeEmptyNamespaces($psr4Autoloads);
|
||||
return $this->cachedComposerJsonPSR4AutoloadPaths;
|
||||
}
|
||||
private function getComposerJsonPath() : string
|
||||
{
|
||||
// assume the project has "composer.json" in root directory
|
||||
return \getcwd() . '/composer.json';
|
||||
}
|
||||
/**
|
||||
* @param array<string, array<string, string>> $psr4Autoloads
|
||||
* @return array<string, array<string, string>>
|
||||
*/
|
||||
private function removeEmptyNamespaces(array $psr4Autoloads) : array
|
||||
{
|
||||
return \array_filter($psr4Autoloads, static function (string $psr4Autoload) : bool {
|
||||
return $psr4Autoload !== '';
|
||||
}, \ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\Composer;
|
||||
|
||||
use RectorPrefix202306\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use Rector\Core\FileSystem\FilePathHelper;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
||||
/**
|
||||
* @see \Rector\Tests\PSR4\Composer\PSR4NamespaceMatcherTest
|
||||
*/
|
||||
final class PSR4NamespaceMatcher implements PSR4AutoloadNamespaceMatcherInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PSR4\Composer\PSR4AutoloadPathsProvider
|
||||
*/
|
||||
private $psr4AutoloadPathsProvider;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\FileSystem\FilePathHelper
|
||||
*/
|
||||
private $filePathHelper;
|
||||
public function __construct(\Rector\PSR4\Composer\PSR4AutoloadPathsProvider $psr4AutoloadPathsProvider, FilePathHelper $filePathHelper)
|
||||
{
|
||||
$this->psr4AutoloadPathsProvider = $psr4AutoloadPathsProvider;
|
||||
$this->filePathHelper = $filePathHelper;
|
||||
}
|
||||
public function getExpectedNamespace(File $file, Node $node) : ?string
|
||||
{
|
||||
$filePath = $file->getFilePath();
|
||||
$psr4Autoloads = $this->psr4AutoloadPathsProvider->provide();
|
||||
foreach ($psr4Autoloads as $namespace => $path) {
|
||||
// remove extra slash
|
||||
$paths = \is_array($path) ? $path : [$path];
|
||||
foreach ($paths as $path) {
|
||||
$relativeFilePath = $this->filePathHelper->relativePath($filePath);
|
||||
$relativeDirectoryPath = \dirname($relativeFilePath);
|
||||
$path = \rtrim($path, '/');
|
||||
if (\strncmp($relativeDirectoryPath, $path, \strlen($path)) !== 0) {
|
||||
continue;
|
||||
}
|
||||
$expectedNamespace = $namespace . $this->resolveExtraNamespace($relativeDirectoryPath, $path);
|
||||
if (\strpos($expectedNamespace, '-') !== \false) {
|
||||
return null;
|
||||
}
|
||||
return \rtrim($expectedNamespace, '\\');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* Get the extra path that is not included in root PSR-4 namespace
|
||||
*/
|
||||
private function resolveExtraNamespace(string $relativeDirectoryPath, string $path) : string
|
||||
{
|
||||
$extraNamespace = Strings::substring($relativeDirectoryPath, Strings::length($path) + 1);
|
||||
$extraNamespace = Strings::replace($extraNamespace, '#/#', '\\');
|
||||
return \trim($extraNamespace);
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\Contract;
|
||||
|
||||
use PhpParser\Node;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
interface PSR4AutoloadNamespaceMatcherInterface
|
||||
{
|
||||
public function getExpectedNamespace(File $file, Node $node) : ?string;
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\NodeManipulator;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\GroupUse;
|
||||
use PhpParser\Node\Stmt\UseUse;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\Constant\RuntimeConstantReflection;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Configuration\Parameter\ParameterProvider;
|
||||
use Rector\Core\Enum\ObjectReference;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
final class FullyQualifyStmtsAnalyzer
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Configuration\Parameter\ParameterProvider
|
||||
*/
|
||||
private $parameterProvider;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser
|
||||
*/
|
||||
private $simpleCallableNodeTraverser;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \PHPStan\Reflection\ReflectionProvider
|
||||
*/
|
||||
private $reflectionProvider;
|
||||
public function __construct(ParameterProvider $parameterProvider, SimpleCallableNodeTraverser $simpleCallableNodeTraverser, NodeNameResolver $nodeNameResolver, ReflectionProvider $reflectionProvider)
|
||||
{
|
||||
$this->parameterProvider = $parameterProvider;
|
||||
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
}
|
||||
/**
|
||||
* @param Stmt[] $stmts
|
||||
*/
|
||||
public function process(array $stmts, Scope $scope) : void
|
||||
{
|
||||
// no need to
|
||||
if ($this->parameterProvider->provideBoolParameter(Option::AUTO_IMPORT_NAMES)) {
|
||||
return;
|
||||
}
|
||||
// FQNize all class names
|
||||
$this->simpleCallableNodeTraverser->traverseNodesWithCallable($stmts, function (Node $node) use($scope) : ?FullyQualified {
|
||||
if (!$node instanceof Name) {
|
||||
return null;
|
||||
}
|
||||
$name = $this->nodeNameResolver->getName($node);
|
||||
if (\in_array($name, [ObjectReference::STATIC, ObjectReference::PARENT, ObjectReference::SELF], \true)) {
|
||||
return null;
|
||||
}
|
||||
if ($this->isNativeConstant($node, $scope)) {
|
||||
return null;
|
||||
}
|
||||
$parentNode = $node->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if ($parentNode instanceof GroupUse) {
|
||||
$parentNode->setAttribute(AttributeKey::ORIGINAL_NODE, null);
|
||||
return null;
|
||||
}
|
||||
if ($parentNode instanceof UseUse) {
|
||||
return null;
|
||||
}
|
||||
return new FullyQualified($name);
|
||||
});
|
||||
}
|
||||
private function isNativeConstant(Name $name, Scope $scope) : bool
|
||||
{
|
||||
$parentNode = $name->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if (!$parentNode instanceof ConstFetch) {
|
||||
return \false;
|
||||
}
|
||||
if (!$this->reflectionProvider->hasConstant($name, $scope)) {
|
||||
return \false;
|
||||
}
|
||||
$globalConstantReflection = $this->reflectionProvider->getConstant($name, $scope);
|
||||
return $globalConstantReflection instanceof RuntimeConstantReflection;
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PSR4\Rector\FileWithoutNamespace;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\Declare_;
|
||||
use PhpParser\Node\Stmt\Namespace_;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace;
|
||||
use Rector\Core\Rector\AbstractScopeAwareRector;
|
||||
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
||||
use Rector\PSR4\NodeManipulator\FullyQualifyStmtsAnalyzer;
|
||||
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ComposerJsonAwareCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector\NormalizeNamespaceByPSR4ComposerAutoloadRectorTest
|
||||
*/
|
||||
final class NormalizeNamespaceByPSR4ComposerAutoloadRector extends AbstractScopeAwareRector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface
|
||||
*/
|
||||
private $psr4AutoloadNamespaceMatcher;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PSR4\NodeManipulator\FullyQualifyStmtsAnalyzer
|
||||
*/
|
||||
private $fullyQualifyStmtsAnalyzer;
|
||||
public function __construct(PSR4AutoloadNamespaceMatcherInterface $psr4AutoloadNamespaceMatcher, FullyQualifyStmtsAnalyzer $fullyQualifyStmtsAnalyzer)
|
||||
{
|
||||
$this->psr4AutoloadNamespaceMatcher = $psr4AutoloadNamespaceMatcher;
|
||||
$this->fullyQualifyStmtsAnalyzer = $fullyQualifyStmtsAnalyzer;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
$description = \sprintf('Adds namespace to namespace-less files or correct namespace to match PSR-4 in `composer.json` autoload section. Run with combination with "%s"', MultipleClassFileToPsr4ClassesRector::class);
|
||||
return new RuleDefinition($description, [new ComposerJsonAwareCodeSample(<<<'CODE_SAMPLE'
|
||||
// src/SomeClass.php
|
||||
|
||||
class SomeClass
|
||||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
// src/SomeClass.php
|
||||
|
||||
namespace App\CustomNamespace;
|
||||
|
||||
class SomeClass
|
||||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
{
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\CustomNamespace\\": "src"
|
||||
}
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Namespace_::class, FileWithoutNamespace::class];
|
||||
}
|
||||
/**
|
||||
* @param FileWithoutNamespace|Namespace_ $node
|
||||
* @return Node|null|Stmt[]
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope)
|
||||
{
|
||||
$expectedNamespace = $this->psr4AutoloadNamespaceMatcher->getExpectedNamespace($this->file, $node);
|
||||
if ($expectedNamespace === null) {
|
||||
return null;
|
||||
}
|
||||
// is namespace and already correctly named?
|
||||
if ($node instanceof Namespace_ && $this->nodeNameResolver->isCaseSensitiveName($node, $expectedNamespace)) {
|
||||
return null;
|
||||
}
|
||||
if ($node instanceof Namespace_ && $this->hasNamespaceInPreviousNamespace($node)) {
|
||||
return null;
|
||||
}
|
||||
// to put declare_strict types on correct place
|
||||
if ($node instanceof FileWithoutNamespace) {
|
||||
return $this->refactorFileWithoutNamespace($node, $expectedNamespace, $scope);
|
||||
}
|
||||
$node->name = new Name($expectedNamespace);
|
||||
$this->fullyQualifyStmtsAnalyzer->process($node->stmts, $scope);
|
||||
return $node;
|
||||
}
|
||||
private function hasNamespaceInPreviousNamespace(Namespace_ $namespace) : bool
|
||||
{
|
||||
return (bool) $this->betterNodeFinder->findFirstPrevious($namespace, static function (Node $node) : bool {
|
||||
return $node instanceof Namespace_;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @return Namespace_|Stmt[]
|
||||
*/
|
||||
private function refactorFileWithoutNamespace(FileWithoutNamespace $fileWithoutNamespace, string $expectedNamespace, Scope $scope)
|
||||
{
|
||||
$nodes = $fileWithoutNamespace->stmts;
|
||||
$declare = null;
|
||||
foreach ($nodes as $key => $fileWithoutNamespace) {
|
||||
if ($key > 0) {
|
||||
break;
|
||||
}
|
||||
if ($fileWithoutNamespace instanceof Declare_) {
|
||||
$declare = $fileWithoutNamespace;
|
||||
unset($nodes[$key]);
|
||||
}
|
||||
}
|
||||
$namespace = new Namespace_(new Name($expectedNamespace), $nodes);
|
||||
$this->fullyQualifyStmtsAnalyzer->process($nodes, $scope);
|
||||
if ($declare instanceof Declare_) {
|
||||
return [$declare, $namespace];
|
||||
}
|
||||
return $namespace;
|
||||
}
|
||||
}
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '203be2b3076a4e7f2f80cee721aa20186868a604';
|
||||
public const PACKAGE_VERSION = '1d8b12dc022dc4ff9c9c26a2fc1ea409027d271b';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-03 18:23:04';
|
||||
public const RELEASE_DATE = '2023-06-03 16:32:43';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitd84de2cf53039de1be8691008b648fd4::getLoader();
|
||||
return ComposerAutoloaderInit14084fdb3a7d29db8393e29bc7ca4896::getLoader();
|
||||
|
|
|
@ -2115,13 +2115,8 @@ return array(
|
|||
'Rector\\PHPUnit\\ValueObject\\DataProviderClassMethodRecipe' => $vendorDir . '/rector/rector-phpunit/src/ValueObject/DataProviderClassMethodRecipe.php',
|
||||
'Rector\\PHPUnit\\ValueObject\\FunctionNameWithAssertMethods' => $vendorDir . '/rector/rector-phpunit/src/ValueObject/FunctionNameWithAssertMethods.php',
|
||||
'Rector\\PHPUnit\\ValueObject\\ParamAndArg' => $vendorDir . '/rector/rector-phpunit/src/ValueObject/ParamAndArg.php',
|
||||
'Rector\\PSR4\\Composer\\PSR4AutoloadPathsProvider' => $baseDir . '/rules/PSR4/Composer/PSR4AutoloadPathsProvider.php',
|
||||
'Rector\\PSR4\\Composer\\PSR4NamespaceMatcher' => $baseDir . '/rules/PSR4/Composer/PSR4NamespaceMatcher.php',
|
||||
'Rector\\PSR4\\Contract\\PSR4AutoloadNamespaceMatcherInterface' => $baseDir . '/rules/PSR4/Contract/PSR4AutoloadNamespaceMatcherInterface.php',
|
||||
'Rector\\PSR4\\FileInfoAnalyzer\\FileInfoDeletionAnalyzer' => $baseDir . '/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php',
|
||||
'Rector\\PSR4\\NodeManipulator\\FullyQualifyStmtsAnalyzer' => $baseDir . '/rules/PSR4/NodeManipulator/FullyQualifyStmtsAnalyzer.php',
|
||||
'Rector\\PSR4\\NodeManipulator\\NamespaceManipulator' => $baseDir . '/rules/PSR4/NodeManipulator/NamespaceManipulator.php',
|
||||
'Rector\\PSR4\\Rector\\FileWithoutNamespace\\NormalizeNamespaceByPSR4ComposerAutoloadRector' => $baseDir . '/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php',
|
||||
'Rector\\PSR4\\Rector\\Namespace_\\MultipleClassFileToPsr4ClassesRector' => $baseDir . '/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php',
|
||||
'Rector\\Parallel\\Application\\ParallelFileProcessor' => $baseDir . '/packages/Parallel/Application/ParallelFileProcessor.php',
|
||||
'Rector\\Parallel\\Command\\WorkerCommandLineFactory' => $baseDir . '/packages/Parallel/Command/WorkerCommandLineFactory.php',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitd84de2cf53039de1be8691008b648fd4
|
||||
class ComposerAutoloaderInit14084fdb3a7d29db8393e29bc7ca4896
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInitd84de2cf53039de1be8691008b648fd4
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd84de2cf53039de1be8691008b648fd4', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit14084fdb3a7d29db8393e29bc7ca4896', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd84de2cf53039de1be8691008b648fd4', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit14084fdb3a7d29db8393e29bc7ca4896', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd84de2cf53039de1be8691008b648fd4::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitd84de2cf53039de1be8691008b648fd4::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitd84de2cf53039de1be8691008b648fd4
|
||||
class ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -2357,13 +2357,8 @@ class ComposerStaticInitd84de2cf53039de1be8691008b648fd4
|
|||
'Rector\\PHPUnit\\ValueObject\\DataProviderClassMethodRecipe' => __DIR__ . '/..' . '/rector/rector-phpunit/src/ValueObject/DataProviderClassMethodRecipe.php',
|
||||
'Rector\\PHPUnit\\ValueObject\\FunctionNameWithAssertMethods' => __DIR__ . '/..' . '/rector/rector-phpunit/src/ValueObject/FunctionNameWithAssertMethods.php',
|
||||
'Rector\\PHPUnit\\ValueObject\\ParamAndArg' => __DIR__ . '/..' . '/rector/rector-phpunit/src/ValueObject/ParamAndArg.php',
|
||||
'Rector\\PSR4\\Composer\\PSR4AutoloadPathsProvider' => __DIR__ . '/../..' . '/rules/PSR4/Composer/PSR4AutoloadPathsProvider.php',
|
||||
'Rector\\PSR4\\Composer\\PSR4NamespaceMatcher' => __DIR__ . '/../..' . '/rules/PSR4/Composer/PSR4NamespaceMatcher.php',
|
||||
'Rector\\PSR4\\Contract\\PSR4AutoloadNamespaceMatcherInterface' => __DIR__ . '/../..' . '/rules/PSR4/Contract/PSR4AutoloadNamespaceMatcherInterface.php',
|
||||
'Rector\\PSR4\\FileInfoAnalyzer\\FileInfoDeletionAnalyzer' => __DIR__ . '/../..' . '/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php',
|
||||
'Rector\\PSR4\\NodeManipulator\\FullyQualifyStmtsAnalyzer' => __DIR__ . '/../..' . '/rules/PSR4/NodeManipulator/FullyQualifyStmtsAnalyzer.php',
|
||||
'Rector\\PSR4\\NodeManipulator\\NamespaceManipulator' => __DIR__ . '/../..' . '/rules/PSR4/NodeManipulator/NamespaceManipulator.php',
|
||||
'Rector\\PSR4\\Rector\\FileWithoutNamespace\\NormalizeNamespaceByPSR4ComposerAutoloadRector' => __DIR__ . '/../..' . '/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php',
|
||||
'Rector\\PSR4\\Rector\\Namespace_\\MultipleClassFileToPsr4ClassesRector' => __DIR__ . '/../..' . '/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php',
|
||||
'Rector\\Parallel\\Application\\ParallelFileProcessor' => __DIR__ . '/../..' . '/packages/Parallel/Application/ParallelFileProcessor.php',
|
||||
'Rector\\Parallel\\Command\\WorkerCommandLineFactory' => __DIR__ . '/../..' . '/packages/Parallel/Command/WorkerCommandLineFactory.php',
|
||||
|
@ -3066,9 +3061,9 @@ class ComposerStaticInitd84de2cf53039de1be8691008b648fd4
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd84de2cf53039de1be8691008b648fd4::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd84de2cf53039de1be8691008b648fd4::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd84de2cf53039de1be8691008b648fd4::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit14084fdb3a7d29db8393e29bc7ca4896::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue