mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 5493b6dc13
5493b6dc13
[DX] Re-use configure() in docs + remove prefixing of ValueObjectInliner (#1410)
This commit is contained in:
parent
f983f475e6
commit
f3d9b9c31c
|
@ -29,6 +29,7 @@ use Rector\BetterPhpDocParser\PhpDocParser\BetterTypeParser;
|
|||
use Rector\Caching\Cache;
|
||||
use Rector\Caching\CacheFactory;
|
||||
use Rector\Core\Console\ConsoleApplication;
|
||||
use Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector;
|
||||
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
|
||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator;
|
||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
|
||||
|
@ -55,6 +56,7 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
|
|||
$services->load('Rector\\Core\\', __DIR__ . '/../src')->exclude([__DIR__ . '/../src/Rector', __DIR__ . '/../src/Exception', __DIR__ . '/../src/DependencyInjection/CompilerPass', __DIR__ . '/../src/DependencyInjection/Loader', __DIR__ . '/../src/Kernel', __DIR__ . '/../src/ValueObject', __DIR__ . '/../src/Bootstrap', __DIR__ . '/../src/Enum', __DIR__ . '/../src/PhpParser/Node/CustomNode', __DIR__ . '/../src/PhpParser/ValueObject', __DIR__ . '/../src/functions', __DIR__ . '/../src/constants.php', __DIR__ . '/../src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php']);
|
||||
$services->alias(\RectorPrefix20211206\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
|
||||
$services->set(\RectorPrefix20211206\Symplify\SmartFileSystem\FileSystemGuard::class);
|
||||
$services->set(\Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector::class)->arg('$containerBuilder', \RectorPrefix20211206\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
|
||||
$services->set(\RectorPrefix20211206\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
|
||||
$services->set(\PhpParser\ParserFactory::class);
|
||||
$services->set(\PhpParser\BuilderFactory::class);
|
||||
|
|
|
@ -22,7 +22,6 @@ All you have to do is using the ChangePackageVersionComposerRector:
|
|||
use Rector\Composer\Rector\ChangePackageVersionComposerRector;
|
||||
use Rector\Composer\ValueObject\PackageAndVersion;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -45,7 +44,6 @@ use Rector\Composer\Rector\ReplacePackageAndVersionComposerRector;
|
|||
use Rector\Composer\ValueObject\PackageAndVersion;
|
||||
use Rector\Composer\ValueObject\ReplacePackageAndVersion;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,6 +52,9 @@ final class VariableToConstantGuard
|
|||
return \true;
|
||||
}
|
||||
$functionReflection = $this->reflectionProvider->getFunction($functionName, $argScope);
|
||||
if (!$argScope instanceof \PHPStan\Analyser\Scope) {
|
||||
return \true;
|
||||
}
|
||||
$referenceParametersPositions = $this->resolveFunctionReferencePositions($functionReflection, [$arg], $argScope);
|
||||
if ($referenceParametersPositions === []) {
|
||||
// no reference always only write
|
||||
|
|
|
@ -252,7 +252,6 @@ require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php
|
|||
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php';
|
||||
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php';
|
||||
require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php';
|
||||
require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/ValueObjectInliner.php';
|
||||
require_once __DIR__ . '/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php';
|
||||
require_once __DIR__ . '/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php';
|
||||
require_once __DIR__ . '/vendor/symfony/contracts/Deprecation/function.php';
|
||||
|
|
|
@ -60,8 +60,6 @@ final class ArgumentAdderRector extends \Rector\Core\Rector\AbstractRector imple
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$objectType = new \PHPStan\Type\ObjectType('SomeType');
|
||||
$exampleConfiguration = [self::ADDED_ARGUMENTS => [new \Rector\Arguments\ValueObject\ArgumentAdder('SomeExampleClass', 'someMethod', 0, 'someArgument', \true, $objectType)]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('This Rector adds new default arguments in calls of defined methods and class types.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
$someObject = new SomeExampleClass;
|
||||
$someObject->someMethod();
|
||||
|
@ -84,7 +82,7 @@ class MyCustomClass extends SomeExampleClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, $exampleConfiguration)]);
|
||||
, [new \Rector\Arguments\ValueObject\ArgumentAdder('SomeExampleClass', 'someMethod', 0, 'someArgument', \true, new \PHPStan\Type\ObjectType('SomeType'))])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -46,7 +46,7 @@ CODE_SAMPLE
|
|||
$someObject = new SomeClass;
|
||||
$someObject->someMethod(false);
|
||||
CODE_SAMPLE
|
||||
, [self::REPLACED_ARGUMENTS => [new \Rector\Arguments\ValueObject\ReplaceArgumentDefaultValue('SomeClass', 'someMethod', 0, 'SomeClass::OLD_CONSTANT', \false)]])]);
|
||||
, [new \Rector\Arguments\ValueObject\ReplaceArgumentDefaultValue('SomeClass', 'someMethod', 0, 'SomeClass::OLD_CONSTANT', \false)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -45,7 +45,7 @@ CODE_SAMPLE
|
|||
, <<<'CODE_SAMPLE'
|
||||
version_compare(PHP_VERSION, '5.6', 'ge');
|
||||
CODE_SAMPLE
|
||||
, [self::REPLACED_ARGUMENTS => [new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'gte', 'ge')]])]);
|
||||
, [new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'gte', 'ge')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -49,7 +49,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FUNCTION_ARGUMENT_SWAPS => [new \Rector\Arguments\ValueObject\SwapFuncCallArguments('some_function', [1, 0])]])]);
|
||||
, [new \Rector\Arguments\ValueObject\SwapFuncCallArguments('some_function', [1, 0])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -66,7 +66,7 @@ class ProductRepository
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::GROUP_NAMES_BY_SUFFIX => ['Repository']])]);
|
||||
, ['Repository'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -46,7 +46,7 @@ class Someclass
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ATTRIBUTES_ORDER => ['First', 'Second']])]);
|
||||
, ['First', 'Second'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -74,7 +74,7 @@ final class SomeTest implements TestCase
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHODS_TO_YIELDS => [new \Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield('PHPUnit\\Framework\\TestCase', '*provide*')]])]);
|
||||
, [new \Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield('PHPUnit\\Framework\\TestCase', '*provide*')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -59,7 +59,7 @@ class SomeClass extends \PHPUnit\Framework\TestCase
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TYPE_TO_PREFERENCE => ['PHPUnit\\Framework\\TestCase' => \Rector\CodingStyle\Enum\PreferenceSelfThis::PREFER_SELF()]])]);
|
||||
, ['PHPUnit\\Framework\\TestCase' => \Rector\CodingStyle\Enum\PreferenceSelfThis::PREFER_SELF()])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -51,7 +51,7 @@ CODE_SAMPLE
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PACKAGES_AND_VERSIONS => [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^3.4')]])]);
|
||||
, [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^3.4')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -51,7 +51,7 @@ CODE_SAMPLE
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PACKAGES_AND_VERSIONS => [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^3.4')]])]);
|
||||
, [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^3.4')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -54,7 +54,7 @@ CODE_SAMPLE
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PACKAGES_AND_VERSIONS => [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^4.4')]])]);
|
||||
, [new \Rector\Composer\ValueObject\PackageAndVersion('symfony/console', '^4.4')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -40,7 +40,7 @@ CODE_SAMPLE
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PACKAGE_NAMES => ['symfony/console']])]);
|
||||
, ['symfony/console'])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -51,7 +51,7 @@ CODE_SAMPLE
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::RENAME_PACKAGES => [new \Rector\Composer\ValueObject\RenamePackage('rector/rector', 'rector/rector-src')]])]);
|
||||
, [new \Rector\Composer\ValueObject\RenamePackage('rector/rector', 'rector/rector-src')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -54,7 +54,7 @@ CODE_SAMPLE
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::REPLACE_PACKAGES_AND_VERSIONS => [new \Rector\Composer\ValueObject\ReplacePackageAndVersion('symfony/console', 'symfony/http-kernel', '^4.4')]])]);
|
||||
, [new \Rector\Composer\ValueObject\ReplacePackageAndVersion('symfony/console', 'symfony/http-kernel', '^4.4')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -53,7 +53,7 @@ final class SomeClass
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ANNOTATIONS_TO_REMOVE => ['method']])]);
|
||||
, ['method'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -51,7 +51,7 @@ class SunshineCommand extends ParentClassWithNewConstructor
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHODS_BY_PARENT_TYPES => ['ParentClassWithNewConstructor' => \Rector\Core\ValueObject\MethodName::CONSTRUCT]])]);
|
||||
, ['ParentClassWithNewConstructor' => \Rector\Core\ValueObject\MethodName::CONSTRUCT])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -70,7 +70,7 @@ class SymfonyRoute
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ATTRIBUTE_TO_ANNOTATION => [new \Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation('Symfony\\Component\\Routing\\Annotation\\Route')]])]);
|
||||
, [new \Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation('Symfony\\Component\\Routing\\Annotation\\Route')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -112,7 +112,7 @@ final class SomeClass implements SomeInterface
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::GENERIC_CLASS_METHOD_PARAMS => [new \Rector\Generics\ValueObject\GenericClassMethodParam('SomeInterface', 'getParams', 0, 'ParamInterface')]])]);
|
||||
, [new \Rector\Generics\ValueObject\GenericClassMethodParam('SomeInterface', 'getParams', 0, 'ParamInterface')])]);
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
|
|
|
@ -76,7 +76,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::CLASSES_TO_SKIP => ['ClassName', 'AnotherClassName']])]);
|
||||
, ['ClassName', 'AnotherClassName'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -46,7 +46,7 @@ class SmartObject
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::RESERVED_KEYWORDS_TO_REPLACEMENTS => ['ReservedObject' => 'SmartObject', 'Object' => 'AnotherSmartObject']])]);
|
||||
, ['ReservedObject' => 'SmartObject', 'Object' => 'AnotherSmartObject'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -64,7 +64,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::RESERVED_NAMES_TO_NEW_ONES => ['fn' => 'someFunctionName']])]);
|
||||
, ['fn' => 'someFunctionName'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -99,7 +99,7 @@ class SymfonyRoute
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ANNOTATION_TO_ATTRIBUTE => [new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\\Component\\Routing\\Annotation\\Route')]])]);
|
||||
, [new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\\Component\\Routing\\Annotation\\Route')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -55,7 +55,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::REPLACE_STRING_WITH_CLASS_CONSTANT => [new \Rector\Privatization\ValueObject\ReplaceStringWithClassConstant('SomeClass', 'call', 0, 'Placeholder')]])]);
|
||||
, [new \Rector\Privatization\ValueObject\ReplaceStringWithClassConstant('SomeClass', 'call', 0, 'Placeholder')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -38,7 +38,7 @@ CODE_SAMPLE
|
|||
$someObject = new SomeClass;
|
||||
$someObject->someMethod();
|
||||
CODE_SAMPLE
|
||||
, [self::REMOVED_ARGUMENTS => [new \Rector\Removing\ValueObject\ArgumentRemover('ExampleClass', 'someMethod', 0, [\true])]])]);
|
||||
, [new \Rector\Removing\ValueObject\ArgumentRemover('ExampleClass', 'someMethod', 0, [\true])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -35,7 +35,7 @@ class SomeClass
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::INTERFACES_TO_REMOVE => ['SomeInterface']])]);
|
||||
, ['SomeInterface'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -48,7 +48,7 @@ final class SomeClass
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PARENT_TYPES_TO_REMOVE => ['SomeParentClass']])]);
|
||||
, ['SomeParentClass'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -42,7 +42,7 @@ class SomeClass
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TRAITS_TO_REMOVE => ['TraitNameToRemove']])]);
|
||||
, ['TraitNameToRemove'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -33,7 +33,7 @@ CODE_SAMPLE
|
|||
, <<<'CODE_SAMPLE'
|
||||
remove_last_arg(1);
|
||||
CODE_SAMPLE
|
||||
, [self::REMOVED_FUNCTION_ARGUMENTS => [new \Rector\Removing\ValueObject\RemoveFuncCallArg('remove_last_arg', 1)]])]);
|
||||
, [new \Rector\Removing\ValueObject\RemoveFuncCallArg('remove_last_arg', 1)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -38,7 +38,6 @@ final class RemoveFuncCallRector extends \Rector\Core\Rector\AbstractRector impl
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$configuration = [self::REMOVE_FUNC_CALLS => [new \Rector\Removing\ValueObject\RemoveFuncCall('ini_get', [1 => ['y2k_compliance']])]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Remove ini_get by configuration', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
ini_get('y2k_compliance');
|
||||
ini_get('keep_me');
|
||||
|
@ -46,7 +45,7 @@ CODE_SAMPLE
|
|||
, <<<'CODE_SAMPLE'
|
||||
ini_get('keep_me');
|
||||
CODE_SAMPLE
|
||||
, $configuration)]);
|
||||
, [new \Rector\Removing\ValueObject\RemoveFuncCall('ini_get', [1 => ['y2k_compliance']])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -30,7 +30,6 @@ final class RenameClassConstFetchRector extends \Rector\Core\Rector\AbstractRect
|
|||
private $renameClassConstFetches = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$configuration = [self::CLASS_CONSTANT_RENAME => [new \Rector\Renaming\ValueObject\RenameClassConstFetch('SomeClass', 'OLD_CONSTANT', 'NEW_CONSTANT'), new \Rector\Renaming\ValueObject\RenameClassAndConstFetch('SomeClass', 'OTHER_OLD_CONSTANT', 'DifferentClass', 'NEW_CONSTANT')]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces defined class constants in their calls.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
$value = SomeClass::OLD_CONSTANT;
|
||||
$value = SomeClass::OTHER_OLD_CONSTANT;
|
||||
|
@ -39,7 +38,7 @@ CODE_SAMPLE
|
|||
$value = SomeClass::NEW_CONSTANT;
|
||||
$value = DifferentClass::NEW_CONSTANT;
|
||||
CODE_SAMPLE
|
||||
, $configuration)]);
|
||||
, [new \Rector\Renaming\ValueObject\RenameClassConstFetch('SomeClass', 'OLD_CONSTANT', 'NEW_CONSTANT'), new \Rector\Renaming\ValueObject\RenameClassAndConstFetch('SomeClass', 'OTHER_OLD_CONSTANT', 'DifferentClass', 'NEW_CONSTANT')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::OLD_TO_NEW_CONSTANTS => ['MYSQL_ASSOC' => 'MYSQLI_ASSOC', 'OLD_CONSTANT' => 'NEW_CONSTANT']])]);
|
||||
, ['MYSQL_ASSOC' => 'MYSQLI_ASSOC', 'OLD_CONSTANT' => 'NEW_CONSTANT'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -65,7 +65,7 @@ CODE_SAMPLE
|
|||
$someService = new Some\Chicken;
|
||||
$someClassToKeep = new Some_Class_To_Keep;
|
||||
CODE_SAMPLE
|
||||
, [self::NAMESPACE_PREFIXES_WITH_EXCLUDED_CLASSES => [new \Rector\Renaming\ValueObject\PseudoNamespaceToNamespace('Some_', ['Some_Class_To_Keep'])]])]);
|
||||
, [new \Rector\Renaming\ValueObject\PseudoNamespaceToNamespace('Some_', ['Some_Class_To_Keep'])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -28,7 +28,7 @@ final class RenameFunctionRector extends \Rector\Core\Rector\AbstractRector impl
|
|||
private $oldFunctionToNewFunction = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns defined function call new one.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('view("...", []);', 'Laravel\\Templating\\render("...", []);', [self::OLD_FUNCTION_TO_NEW_FUNCTION => ['view' => 'Laravel\\Templating\\render']])]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns defined function call new one.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('view("...", []);', 'Laravel\\Templating\\render("...", []);', ['view' => 'Laravel\\Templating\\render'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -59,7 +59,7 @@ CODE_SAMPLE
|
|||
$someObject = new SomeExampleClass;
|
||||
$someObject->newMethod();
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_CALL_RENAMES => [new \Rector\Renaming\ValueObject\MethodCallRename('SomeExampleClass', 'oldMethod', 'newMethod')]])]);
|
||||
, [new \Rector\Renaming\ValueObject\MethodCallRename('SomeExampleClass', 'oldMethod', 'newMethod')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -71,7 +71,7 @@ function someFunction(SomeNewClass $someOldClass): SomeNewClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::OLD_TO_NEW_CLASSES => ['App\\SomeOldClass' => 'App\\SomeNewClass']])]);
|
||||
, ['App\\SomeOldClass' => 'App\\SomeNewClass'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -47,7 +47,7 @@ final class RenameNamespaceRector extends \Rector\Core\Rector\AbstractRector imp
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces old namespace by new one.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('$someObject = new SomeOldNamespace\\SomeClass;', '$someObject = new SomeNewNamespace\\SomeClass;', [self::OLD_TO_NEW_NAMESPACES => ['SomeOldNamespace' => 'SomeNewNamespace']])]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces old namespace by new one.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('$someObject = new SomeOldNamespace\\SomeClass;', '$someObject = new SomeNewNamespace\\SomeClass;', ['SomeOldNamespace' => 'SomeNewNamespace'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -33,7 +33,7 @@ final class RenamePropertyRector extends \Rector\Core\Rector\AbstractRector impl
|
|||
private $renamedProperties = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces defined old properties by new ones.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('$someObject->someOldProperty;', '$someObject->someNewProperty;', [self::RENAMED_PROPERTIES => [new \Rector\Renaming\ValueObject\RenameProperty('SomeClass', 'someOldProperty', 'someNewProperty')]])]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces defined old properties by new ones.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('$someObject->someOldProperty;', '$someObject->someNewProperty;', [new \Rector\Renaming\ValueObject\RenameProperty('SomeClass', 'someOldProperty', 'someNewProperty')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -22,19 +22,13 @@ final class RenameStaticMethodRector extends \Rector\Core\Rector\AbstractRector
|
|||
* @var string
|
||||
*/
|
||||
public const OLD_TO_NEW_METHODS_BY_CLASSES = 'old_to_new_method_by_classes';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private const SOME_CLASS = 'SomeClass';
|
||||
/**
|
||||
* @var RenameStaticMethod[]
|
||||
*/
|
||||
private $staticMethodRenames = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$renameClassConfiguration = [self::OLD_TO_NEW_METHODS_BY_CLASSES => [new \Rector\Renaming\ValueObject\RenameStaticMethod(self::SOME_CLASS, 'oldMethod', 'AnotherExampleClass', 'newStaticMethod')]];
|
||||
$renameMethodConfiguration = [self::OLD_TO_NEW_METHODS_BY_CLASSES => [new \Rector\Renaming\ValueObject\RenameStaticMethod(self::SOME_CLASS, 'oldMethod', self::SOME_CLASS, 'newStaticMethod')]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns method names to new ones.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('SomeClass::oldStaticMethod();', 'AnotherExampleClass::newStaticMethod();', $renameClassConfiguration), new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('SomeClass::oldStaticMethod();', 'SomeClass::newStaticMethod();', $renameMethodConfiguration)]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns method names to new ones.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('SomeClass::oldStaticMethod();', 'AnotherExampleClass::newStaticMethod();', [new \Rector\Renaming\ValueObject\RenameStaticMethod('SomeClass', 'oldMethod', 'AnotherExampleClass', 'newStaticMethod')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -45,7 +45,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::STRING_CHANGES => ['ROLE_PREVIOUS_ADMIN' => 'IS_IMPERSONATOR']])]);
|
||||
, ['ROLE_PREVIOUS_ADMIN' => 'IS_IMPERSONATOR'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -52,7 +52,7 @@ class SomeClass
|
|||
public $id;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::USE_IMPORTS_TO_RESTORE => [new \Rector\Restoration\ValueObject\CompleteImportForPartialAnnotation('Doctrine\\ORM\\Mapping', 'ORM')]])]);
|
||||
, [new \Rector\Restoration\ValueObject\CompleteImportForPartialAnnotation('Doctrine\\ORM\\Mapping', 'ORM')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -55,7 +55,7 @@ class RouterFactory
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::DIM_FETCH_ASSIGN_TO_METHOD_CALL => [new \Rector\Transform\ValueObject\DimFetchAssignToMethodCall('Nette\\Application\\Routers\\RouteList', 'Nette\\Application\\Routers\\Route', 'addRoute')]])]);
|
||||
, [new \Rector\Transform\ValueObject\DimFetchAssignToMethodCall('Nette\\Application\\Routers\\RouteList', 'Nette\\Application\\Routers\\Route', 'addRoute')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -57,7 +57,7 @@ CODE_SAMPLE
|
|||
$container = new SomeContainer;
|
||||
$container->setService("someService", $someService);
|
||||
CODE_SAMPLE
|
||||
, [self::TYPE_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\GetAndSetToMethodCall('SomeContainer', 'addService', 'getService')]])]);
|
||||
, [new \Rector\Transform\ValueObject\GetAndSetToMethodCall('SomeContainer', 'addService', 'getService')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -36,7 +36,7 @@ CODE_SAMPLE
|
|||
$someObject = new SomeClass;
|
||||
$someObject->newMethodCall(false);
|
||||
CODE_SAMPLE
|
||||
, [self::PROPERTY_ASSIGNS_TO_METHODS_CALLS => [new \Rector\Transform\ValueObject\PropertyAssignToMethodCall('SomeClass', 'oldProperty', 'newMethodCall')]])]);
|
||||
, [new \Rector\Transform\ValueObject\PropertyAssignToMethodCall('SomeClass', 'oldProperty', 'newMethodCall')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -29,23 +29,19 @@ final class PropertyFetchToMethodCallRector extends \Rector\Core\Rector\Abstract
|
|||
private $propertiesToMethodCalls = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$firstConfiguration = [self::PROPERTIES_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('SomeObject', 'property', 'getProperty', 'setProperty')]];
|
||||
$secondConfiguration = [self::PROPERTIES_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('SomeObject', 'property', 'getConfig', null, ['someArg'])]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replaces properties assign calls be defined methods.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
$result = $object->property;
|
||||
$object->property = $value;
|
||||
|
||||
$bare = $object->bareProperty;
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
$result = $object->getProperty();
|
||||
$object->setProperty($value);
|
||||
|
||||
$bare = $object->getConfig('someArg');
|
||||
CODE_SAMPLE
|
||||
, $firstConfiguration), new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
$result = $object->property;
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
$result = $object->getProperty('someArg');
|
||||
CODE_SAMPLE
|
||||
, $secondConfiguration)]);
|
||||
, [new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('SomeObject', 'property', 'getProperty', 'setProperty'), new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('SomeObject', 'bareProperty', 'getConfig', null, ['someArg'])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -48,7 +48,7 @@ class SomeClass
|
|||
public $name;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::ATTRIBUTE_KEYS_TO_CLASS_CONST_FETCHES => [new \Rector\Transform\ValueObject\AttributeKeyToClassConstFetch('Doctrine\\ORM\\Mapping\\Column', 'type', 'Doctrine\\DBAL\\Types\\Types', ['string' => 'STRING'])]])]);
|
||||
, [new \Rector\Transform\ValueObject\AttributeKeyToClassConstFetch('Doctrine\\ORM\\Mapping\\Column', 'type', 'Doctrine\\DBAL\\Types\\Types', ['string' => 'STRING'])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -63,7 +63,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::SINGLES_TO_MANY_METHODS => [new \Rector\Transform\ValueObject\SingleToManyMethod('SomeClass', 'getNode', 'getNodes')]])]);
|
||||
, [new \Rector\Transform\ValueObject\SingleToManyMethod('SomeClass', 'getNode', 'getNodes')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -47,7 +47,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TYPE_METHOD_WRAPS => [new \Rector\Transform\ValueObject\WrapReturn('SomeClass', 'getItem', \true)]])]);
|
||||
, [new \Rector\Transform\ValueObject\WrapReturn('SomeClass', 'getItem', \true)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -41,7 +41,7 @@ class SomeClass extends SomeParent implements SomeInterface
|
|||
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::INTERFACE_BY_PARENT => ['SomeParent' => 'SomeInterface']])]);
|
||||
, ['SomeParent' => 'SomeInterface'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -41,7 +41,7 @@ class SomeClass implements SomeInterface
|
|||
use SomeTrait;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::INTERFACE_BY_TRAIT => ['SomeTrait' => 'SomeInterface']])]);
|
||||
, ['SomeTrait' => 'SomeInterface'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -41,7 +41,7 @@ class SomeClass implements SomeInterface
|
|||
{
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::OLD_TO_NEW_INTERFACES => ['SomeOldInterface' => 'SomeInterface']])]);
|
||||
, ['SomeOldInterface' => 'SomeInterface'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -58,7 +58,7 @@ class SomeClass
|
|||
use Nette\SmartObject;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PARENT_CLASS_TO_TRAITS => [new \Rector\Transform\ValueObject\ParentClassToTraits('Nette\\Object', ['Nette\\SmartObject'])]])]);
|
||||
, [new \Rector\Transform\ValueObject\ParentClassToTraits('Nette\\Object', ['Nette\\SmartObject'])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -91,7 +91,7 @@ class SomeController
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FUNCTIONS_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\ArgumentFuncCallToMethodCall('view', 'Illuminate\\Contracts\\View\\Factory', 'make')]])]);
|
||||
, [new \Rector\Transform\ValueObject\ArgumentFuncCallToMethodCall('view', 'Illuminate\\Contracts\\View\\Factory', 'make')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -45,7 +45,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FUNCTIONS_TO_CONSTANTS => ['php_sapi_name' => 'PHP_SAPI']])]);
|
||||
, ['php_sapi_name' => 'PHP_SAPI'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -66,7 +66,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FUNC_CALL_TO_CLASS_METHOD_CALL => [new \Rector\Transform\ValueObject\FuncCallToMethodCall('view', 'Namespaced\\SomeRenderer', 'render')]])]);
|
||||
, [new \Rector\Transform\ValueObject\FuncCallToMethodCall('view', 'Namespaced\\SomeRenderer', 'render')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -45,7 +45,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FUNCTIONS_TO_NEWS => ['collection' => ['Collection']]])]);
|
||||
, ['collection' => ['Collection']])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -26,7 +26,7 @@ final class FuncCallToStaticCallRector extends \Rector\Core\Rector\AbstractRecto
|
|||
private $funcCallsToStaticCalls = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns defined function call to static method call.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('view("...", []);', 'SomeClass::render("...", []);', [self::FUNC_CALLS_TO_STATIC_CALLS => [new \Rector\Transform\ValueObject\FuncCallToStaticCall('view', 'SomeStaticClass', 'render')]])]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns defined function call to static method call.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('view("...", []);', 'SomeClass::render("...", []);', [new \Rector\Transform\ValueObject\FuncCallToStaticCall('view', 'SomeStaticClass', 'render')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -28,7 +28,6 @@ final class UnsetAndIssetToMethodCallRector extends \Rector\Core\Rector\Abstract
|
|||
private $issetUnsetToMethodCalls = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$unsetAndIssetToMethodCall = new \Rector\Transform\ValueObject\UnsetAndIssetToMethodCall('SomeContainer', 'hasService', 'removeService');
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns defined `__isset`/`__unset` calls to specific method calls.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
$container = new SomeContainer;
|
||||
isset($container["someKey"]);
|
||||
|
@ -39,7 +38,7 @@ $container = new SomeContainer;
|
|||
$container->hasService("someKey");
|
||||
$container->removeService("someKey");
|
||||
CODE_SAMPLE
|
||||
, [self::ISSET_UNSET_TO_METHOD_CALL => [$unsetAndIssetToMethodCall]])]);
|
||||
, [new \Rector\Transform\ValueObject\UnsetAndIssetToMethodCall('SomeContainer', 'hasService', 'removeService')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -64,7 +64,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::CALLABLE_IN_METHOD_CALL_TO_VARIABLE => [new \Rector\Transform\ValueObject\CallableInMethodCallToVariable('Nette\\Caching\\Cache', 'save', 1)]])]);
|
||||
, [new \Rector\Transform\ValueObject\CallableInMethodCallToVariable('Nette\\Caching\\Cache', 'save', 1)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -35,7 +35,7 @@ CODE_SAMPLE
|
|||
$serviceDefinition = new Nette\DI\ServiceDefinition;
|
||||
$serviceDefinition->addTag('inject');
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_CALL_RENAMES_WITH_ADDED_ARGUMENTS => [new \Rector\Transform\ValueObject\MethodCallToAnotherMethodCallWithArguments('Nette\\DI\\ServiceDefinition', 'setInject', 'addTag', ['inject'])]])]);
|
||||
, [new \Rector\Transform\ValueObject\MethodCallToAnotherMethodCallWithArguments('Nette\\DI\\ServiceDefinition', 'setInject', 'addTag', ['inject'])])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_CALL_TO_PROPERTY_FETCHES => ['someMethod' => 'someProperty']])]);
|
||||
, ['someMethod' => 'someProperty'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -58,7 +58,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_CALLS_TO_STATIC_CALLS => [new \Rector\Transform\ValueObject\MethodCallToStaticCall('AnotherDependency', 'process', 'StaticCaller', 'anotherMethod')]])]);
|
||||
, [new \Rector\Transform\ValueObject\MethodCallToStaticCall('AnotherDependency', 'process', 'StaticCaller', 'anotherMethod')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::PARENT_CALLS_TO_PROPERTIES => [new \Rector\Transform\ValueObject\ReplaceParentCallByPropertyCall('SomeTypeToReplace', 'someMethodCall', 'someProperty')]])]);
|
||||
, [new \Rector\Transform\ValueObject\ReplaceParentCallByPropertyCall('SomeTypeToReplace', 'someMethodCall', 'someProperty')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -120,7 +120,7 @@ final class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_CALL_TO_SERVICES => [new \Rector\Transform\ValueObject\ServiceGetterToConstructorInjection('FirstService', 'getAnotherService', 'AnotherService')]])]);
|
||||
, [new \Rector\Transform\ValueObject\ServiceGetterToConstructorInjection('FirstService', 'getAnotherService', 'AnotherService')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -49,7 +49,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::NEW_ARGS_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\NewArgToMethodCall('Dotenv', \true, 'usePutenv')]])]);
|
||||
, [new \Rector\Transform\ValueObject\NewArgToMethodCall('Dotenv', \true, 'usePutenv')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -92,7 +92,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TYPES_TO_CONSTRUCTOR_INJECTION => ['Validator']])]);
|
||||
, ['Validator'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -70,7 +70,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::NEWS_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\NewToMethodCall('MyClass', 'MyClassFactory', 'create')]])]);
|
||||
, [new \Rector\Transform\ValueObject\NewToMethodCall('MyClass', 'MyClassFactory', 'create')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TYPE_TO_STATIC_CALLS => [new \Rector\Transform\ValueObject\NewToStaticCall('Cookie', 'Cookie', 'create')]])]);
|
||||
, [new \Rector\Transform\ValueObject\NewToStaticCall('Cookie', 'Cookie', 'create')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -35,7 +35,7 @@ final class StaticCallToFuncCallRector extends \Rector\Core\Rector\AbstractRecto
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns static call to function call.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('OldClass::oldMethod("args");', 'new_function("args");', [self::STATIC_CALLS_TO_FUNCTIONS => [new \Rector\Transform\ValueObject\StaticCallToFuncCall('OldClass', 'oldMethod', 'new_function')]])]);
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Turns static call to function call.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample('OldClass::oldMethod("args");', 'new_function("args");', [new \Rector\Transform\ValueObject\StaticCallToFuncCall('OldClass', 'oldMethod', 'new_function')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -75,7 +75,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::STATIC_CALLS_TO_METHOD_CALLS => [new \Rector\Transform\ValueObject\StaticCallToMethodCall('Nette\\Utils\\FileSystem', 'write', 'Symplify\\SmartFileSystem\\SmartFileSystem', 'dumpFile')]])]);
|
||||
, [new \Rector\Transform\ValueObject\StaticCallToMethodCall('Nette\\Utils\\FileSystem', 'write', 'Symplify\\SmartFileSystem\\SmartFileSystem', 'dumpFile')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -48,7 +48,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::STATIC_CALLS_TO_NEWS => [new \Rector\Transform\ValueObject\StaticCallToNew('JsonResponse', 'create')]])]);
|
||||
, [new \Rector\Transform\ValueObject\StaticCallToNew('JsonResponse', 'create')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,7 @@ final class SomeSubscriber
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::STRINGS_TO_CLASS_CONSTANTS => [new \Rector\Transform\ValueObject\StringToClassConstant('compiler.post_dump', 'Yet\\AnotherClass', 'CONSTANT')]])]);
|
||||
, [new \Rector\Transform\ValueObject\StringToClassConstant('compiler.post_dump', 'Yet\\AnotherClass', 'CONSTANT')])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -39,7 +39,7 @@ $someValue = new SomeObject;
|
|||
$result = $someValue->getPath();
|
||||
$result = $someValue->getPath();
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_NAMES_BY_TYPE => ['SomeObject' => 'getPath']])]);
|
||||
, ['SomeObject' => 'getPath'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -44,7 +44,6 @@ final class AddParamTypeDeclarationRector extends \Rector\Core\Rector\AbstractRe
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$configuration = [self::PARAMETER_TYPEHINTS => [new \Rector\TypeDeclaration\ValueObject\AddParamTypeDeclaration('SomeClass', 'process', 0, new \PHPStan\Type\StringType())]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Add param types where needed', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
|
@ -61,7 +60,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, $configuration)]);
|
||||
, [new \Rector\TypeDeclaration\ValueObject\AddParamTypeDeclaration('SomeClass', 'process', 0, new \PHPStan\Type\StringType())])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -41,7 +41,6 @@ final class AddReturnTypeDeclarationRector extends \Rector\Core\Rector\AbstractR
|
|||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
$arrayType = new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
|
||||
$configuration = [self::METHOD_RETURN_TYPES => [new \Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration('SomeClass', 'getData', $arrayType)]];
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Changes defined return typehint of method and class.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
|
@ -58,7 +57,7 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, $configuration)]);
|
||||
, [new \Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration('SomeClass', 'getData', $arrayType)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -59,7 +59,7 @@ class MyClass extends FrameworkClass
|
|||
protected const SOME_CONSTANT = 1;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::CLASS_CONSTANT_VISIBILITY_CHANGES => [new \Rector\Visibility\ValueObject\ChangeConstantVisibility('ParentObject', 'SOME_CONSTANT', \Rector\Core\ValueObject\Visibility::PROTECTED)]])]);
|
||||
, [new \Rector\Visibility\ValueObject\ChangeConstantVisibility('ParentObject', 'SOME_CONSTANT', \Rector\Core\ValueObject\Visibility::PROTECTED)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -76,7 +76,7 @@ class MyClass extends FrameworkClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::METHOD_VISIBILITIES => [new \Rector\Visibility\ValueObject\ChangeMethodVisibility('FrameworkClass', 'someMethod', \Rector\Core\ValueObject\Visibility::PROTECTED)]])]);
|
||||
, [new \Rector\Visibility\ValueObject\ChangeMethodVisibility('FrameworkClass', 'someMethod', \Rector\Core\ValueObject\Visibility::PROTECTED)])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '9beed78815dacf76418e7823fbfe4e39877a35d4';
|
||||
public const PACKAGE_VERSION = '5493b6dc131a773e4ffe6c7fc3cf5e89f661e87e';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-12-06 20:33:54';
|
||||
public const RELEASE_DATE = '2021-12-06 21:59:45';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20211206\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
|
@ -155,7 +155,7 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC
|
|||
// 1. inform user about non-runnable rules
|
||||
$this->missedRectorDueVersionChecker->check($this->rectors);
|
||||
// 2. inform user about registering configurable rule without configuration
|
||||
$this->emptyConfigurableRectorChecker->check($this->rectors);
|
||||
$this->emptyConfigurableRectorChecker->check();
|
||||
// 3. collect all files from files+dirs provided paths
|
||||
$files = $this->fileFactory->createFromPaths($paths, $configuration);
|
||||
// 4. PHPStan has to know about all files too
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Rector\Core\DependencyInjection\Loader\Configurator;
|
|||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use RectorPrefix20211206\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
use RectorPrefix20211206\Symfony\Component\DependencyInjection\Loader\Configurator\ServiceConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
use RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
/**
|
||||
* @api
|
||||
* Same as Symfony service configurator, with extra "configure()" method for easier DX
|
||||
|
@ -22,7 +22,7 @@ final class RectorServiceConfigurator extends \RectorPrefix20211206\Symfony\Comp
|
|||
// decorate with value object inliner so Symfony understands, see https://getrector.org/blog/2020/09/07/how-to-inline-value-object-in-symfony-php-config
|
||||
\array_walk_recursive($configuration, function (&$value) {
|
||||
if (\is_object($value)) {
|
||||
$value = \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline($value);
|
||||
$value = \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline($value);
|
||||
}
|
||||
return $value;
|
||||
});
|
||||
|
|
|
@ -53,7 +53,7 @@ CODE_SAMPLE
|
|||
services:
|
||||
- SomeNewClass
|
||||
CODE_SAMPLE
|
||||
, [self::RENAME_CLASSES => ['SomeOldClass' => 'SomeNewClass']])]);
|
||||
, ['SomeOldClass' => 'SomeNewClass'])]);
|
||||
}
|
||||
public function refactorFileContent(string $fileContent) : string
|
||||
{
|
||||
|
|
|
@ -4,78 +4,55 @@ declare (strict_types=1);
|
|||
namespace Rector\Core\Validation\Collector;
|
||||
|
||||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
use Rector\Core\NonPhpFile\Rector\RenameClassNonPhpRector;
|
||||
use Rector\Naming\Naming\PropertyNaming;
|
||||
use RectorPrefix20211206\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use RectorPrefix20211206\Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use RectorPrefix20211206\Symfony\Component\DependencyInjection\Definition;
|
||||
/**
|
||||
* @see \Rector\Core\Tests\Validation\Collector\EmptyConfigurableRectorCollector\EmptyConfigurableRectorCollectorTest
|
||||
*/
|
||||
final class EmptyConfigurableRectorCollector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerBuilder
|
||||
*/
|
||||
private $privatesAccessor;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Naming\Naming\PropertyNaming
|
||||
*/
|
||||
private $propertyNaming;
|
||||
public function __construct(\RectorPrefix20211206\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor, \Rector\Naming\Naming\PropertyNaming $propertyNaming)
|
||||
private $containerBuilder;
|
||||
public function __construct(\RectorPrefix20211206\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder)
|
||||
{
|
||||
$this->privatesAccessor = $privatesAccessor;
|
||||
$this->propertyNaming = $propertyNaming;
|
||||
$this->containerBuilder = $containerBuilder;
|
||||
}
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
* @return RectorInterface[]
|
||||
* @return array<class-string<ConfigurableRectorInterface>>
|
||||
*/
|
||||
public function resolveEmptyConfigurable(array $rectors) : array
|
||||
public function resolveEmptyConfigurableRectorClasses() : array
|
||||
{
|
||||
$emptyConfigurableRectors = [];
|
||||
foreach ($rectors as $rector) {
|
||||
if ($this->shouldSkip($rector)) {
|
||||
$emptyConfigurableRectorClasses = [];
|
||||
foreach ($this->containerBuilder->getServiceIds() as $serviceId) {
|
||||
if (!\is_a($serviceId, \Rector\Core\Contract\Rector\ConfigurableRectorInterface::class, \true)) {
|
||||
continue;
|
||||
}
|
||||
$emptyConfigurableRectors = $this->collectEmptyConfigurableRectors($rector, $emptyConfigurableRectors);
|
||||
// it seems always loaded
|
||||
if (\is_a($serviceId, \Rector\Core\NonPhpFile\Rector\RenameClassNonPhpRector::class, \true)) {
|
||||
continue;
|
||||
}
|
||||
$serviceDefinition = $this->containerBuilder->getDefinition($serviceId);
|
||||
if ($this->hasConfigureMethodCall($serviceDefinition)) {
|
||||
continue;
|
||||
}
|
||||
$emptyConfigurableRectorClasses[] = $serviceId;
|
||||
}
|
||||
return $emptyConfigurableRectors;
|
||||
return $emptyConfigurableRectorClasses;
|
||||
}
|
||||
/**
|
||||
* @param RectorInterface[] $emptyConfigurableRectors
|
||||
* @return RectorInterface[]
|
||||
*/
|
||||
private function collectEmptyConfigurableRectors(\Rector\Core\Contract\Rector\RectorInterface $rector, array $emptyConfigurableRectors) : array
|
||||
private function hasConfigureMethodCall(\RectorPrefix20211206\Symfony\Component\DependencyInjection\Definition $definition) : bool
|
||||
{
|
||||
$ruleDefinition = $rector->getRuleDefinition();
|
||||
/** @var ConfiguredCodeSample[] $codeSamples */
|
||||
$codeSamples = $ruleDefinition->getCodeSamples();
|
||||
foreach ($codeSamples as $codeSample) {
|
||||
$configuration = $codeSample->getConfiguration();
|
||||
foreach (\array_keys($configuration) as $key) {
|
||||
$key = $this->propertyNaming->underscoreToName($key);
|
||||
if (!\property_exists($rector, $key)) {
|
||||
continue;
|
||||
}
|
||||
// @see https://github.com/rectorphp/rector-laravel/pull/19
|
||||
if (\strncmp($key, 'exclude', \strlen('exclude')) === 0) {
|
||||
continue;
|
||||
}
|
||||
$value = $this->privatesAccessor->getPrivateProperty($rector, $key);
|
||||
if ($value === []) {
|
||||
$emptyConfigurableRectors[] = $rector;
|
||||
return $emptyConfigurableRectors;
|
||||
foreach ($definition->getMethodCalls() as $methodCall) {
|
||||
if ($methodCall[0] === 'configure') {
|
||||
if (!isset($methodCall[1][0])) {
|
||||
return \false;
|
||||
}
|
||||
return $methodCall[1][0] !== [];
|
||||
}
|
||||
}
|
||||
return $emptyConfigurableRectors;
|
||||
}
|
||||
private function shouldSkip(\Rector\Core\Contract\Rector\RectorInterface $rector) : bool
|
||||
{
|
||||
if (!$rector instanceof \Rector\Core\Contract\Rector\ConfigurableRectorInterface) {
|
||||
return \true;
|
||||
}
|
||||
// it seems always loaded
|
||||
return $rector instanceof \Rector\Core\NonPhpFile\Rector\RenameClassNonPhpRector;
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\Core\Validation;
|
||||
|
||||
use function count;
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector;
|
||||
use RectorPrefix20211206\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
final class EmptyConfigurableRectorChecker
|
||||
|
@ -24,17 +23,14 @@ final class EmptyConfigurableRectorChecker
|
|||
$this->emptyConfigurableRectorCollector = $emptyConfigurableRectorCollector;
|
||||
$this->symfonyStyle = $symfonyStyle;
|
||||
}
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
*/
|
||||
public function check(array $rectors) : void
|
||||
public function check() : void
|
||||
{
|
||||
$emptyConfigurableRectors = $this->emptyConfigurableRectorCollector->resolveEmptyConfigurable($rectors);
|
||||
if ($emptyConfigurableRectors === []) {
|
||||
$emptyConfigurableRectorClasses = $this->emptyConfigurableRectorCollector->resolveEmptyConfigurableRectorClasses();
|
||||
if ($emptyConfigurableRectorClasses === []) {
|
||||
return;
|
||||
}
|
||||
$this->reportWarningMessage($emptyConfigurableRectors);
|
||||
$solutionMessage = \sprintf('Do you want to run them?%sConfigure them in `rector.php` with ...->call("configure", ...);', \PHP_EOL);
|
||||
$this->reportWarningMessage($emptyConfigurableRectorClasses);
|
||||
$solutionMessage = \sprintf('Do you want to run them?%sConfigure them in `rector.php` with "...->configure(...);"', \PHP_EOL);
|
||||
$this->symfonyStyle->note($solutionMessage);
|
||||
if (!$this->symfonyStyle->isVerbose()) {
|
||||
// ensure there is new line after progress bar and report : "[OK] Rector is done!" with add a space
|
||||
|
@ -42,14 +38,14 @@ final class EmptyConfigurableRectorChecker
|
|||
}
|
||||
}
|
||||
/**
|
||||
* @param RectorInterface[] $emptyConfigurableRectors
|
||||
* @param array<class-string<ConfigurableRectorInterface>> $emptyConfigurableRectorClasses
|
||||
*/
|
||||
private function reportWarningMessage(array $emptyConfigurableRectors) : void
|
||||
private function reportWarningMessage(array $emptyConfigurableRectorClasses) : void
|
||||
{
|
||||
$warningMessage = \sprintf('Your project contains %d configurable rector rules that are skipped as need to be configured to run.', \count($emptyConfigurableRectors));
|
||||
$warningMessage = \sprintf('Your project contains %d configurable rector rules that are skipped as need to be configured to run.', \count($emptyConfigurableRectorClasses));
|
||||
$this->symfonyStyle->warning($warningMessage);
|
||||
foreach ($emptyConfigurableRectors as $emptyConfigurableRector) {
|
||||
$this->symfonyStyle->writeln(' * ' . \get_class($emptyConfigurableRector));
|
||||
foreach ($emptyConfigurableRectorClasses as $emptyConfigurableRectorClass) {
|
||||
$this->symfonyStyle->writeln(' * ' . $emptyConfigurableRectorClass);
|
||||
}
|
||||
// to take time to absorb it
|
||||
\sleep(3);
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2::getLoader();
|
||||
return ComposerAutoloaderInit6df79435bbacb5d1ffde7458ef87638b::getLoader();
|
||||
|
|
|
@ -1289,6 +1289,8 @@ return array(
|
|||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\Normalizer\\PathNormalizer' => $vendorDir . '/symplify/smart-file-system/src/Normalizer/PathNormalizer.php',
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\SmartFileInfo' => $vendorDir . '/symplify/smart-file-system/src/SmartFileInfo.php',
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\SmartFileSystem' => $vendorDir . '/symplify/smart-file-system/src/SmartFileSystem.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\Reflection\\ArgumentAndParameterFactory' => $vendorDir . '/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\ValueObjectInliner' => $vendorDir . '/symplify/symfony-php-config/src/ValueObjectInliner.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\Config\\Loader\\ParameterMergingLoaderFactory' => $vendorDir . '/symplify/symplify-kernel/src/Config/Loader/ParameterMergingLoaderFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\ContainerBuilderFactory' => $vendorDir . '/symplify/symplify-kernel/src/ContainerBuilderFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\Contract\\Config\\LoaderFactoryInterface' => $vendorDir . '/symplify/symplify-kernel/src/Contract/Config/LoaderFactoryInterface.php',
|
||||
|
@ -2894,6 +2896,7 @@ return array(
|
|||
'Rector\\Symfony\\Rector\\StaticCall\\ParseFileRector' => $vendorDir . '/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php',
|
||||
'Rector\\Symfony\\Rector\\StaticCall\\ProcessBuilderInstanceRector' => $vendorDir . '/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php',
|
||||
'Rector\\Symfony\\Set\\JMSSetList' => $vendorDir . '/rector/rector-symfony/src/Set/JMSSetList.php',
|
||||
'Rector\\Symfony\\Set\\SensiolabsSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SensiolabsSetList.php',
|
||||
'Rector\\Symfony\\Set\\SwiftmailerSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SwiftmailerSetList.php',
|
||||
'Rector\\Symfony\\Set\\SymfonyLevelSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SymfonyLevelSetList.php',
|
||||
'Rector\\Symfony\\Set\\SymfonySetList' => $vendorDir . '/rector/rector-symfony/src/Set/SymfonySetList.php',
|
||||
|
@ -3380,8 +3383,6 @@ return array(
|
|||
'Symplify\\RuleDocGenerator\\ValueObject\\CodeSample\\ConfiguredCodeSample' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/ValueObject/CodeSample/ConfiguredCodeSample.php',
|
||||
'Symplify\\RuleDocGenerator\\ValueObject\\CodeSample\\ExtraFileCodeSample' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/ValueObject/CodeSample/ExtraFileCodeSample.php',
|
||||
'Symplify\\RuleDocGenerator\\ValueObject\\RuleDefinition' => $vendorDir . '/symplify/rule-doc-generator-contracts/src/ValueObject/RuleDefinition.php',
|
||||
'Symplify\\SymfonyPhpConfig\\Reflection\\ArgumentAndParameterFactory' => $vendorDir . '/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php',
|
||||
'Symplify\\SymfonyPhpConfig\\ValueObjectInliner' => $vendorDir . '/symplify/symfony-php-config/src/ValueObjectInliner.php',
|
||||
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
|
||||
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
||||
);
|
||||
|
|
|
@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Symplify\\SymfonyPhpConfig\\' => array($vendorDir . '/symplify/symfony-php-config/src'),
|
||||
'Symplify\\RuleDocGenerator\\' => array($vendorDir . '/symplify/rule-doc-generator-contracts/src'),
|
||||
'Ssch\\TYPO3Rector\\PHPStan\\' => array($vendorDir . '/ssch/typo3-rector/utils/phpstan/src'),
|
||||
'Ssch\\TYPO3Rector\\' => array($vendorDir . '/ssch/typo3-rector/src'),
|
||||
|
@ -25,6 +24,7 @@ return array(
|
|||
'RectorPrefix20211206\\Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
|
||||
'RectorPrefix20211206\\Symplify\\VendorPatches\\' => array($vendorDir . '/symplify/vendor-patches/src'),
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\' => array($vendorDir . '/symplify/symplify-kernel/src'),
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\' => array($vendorDir . '/symplify/symfony-php-config/src'),
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\' => array($vendorDir . '/symplify/smart-file-system/src'),
|
||||
'RectorPrefix20211206\\Symplify\\Skipper\\' => array($vendorDir . '/symplify/skipper/src'),
|
||||
'RectorPrefix20211206\\Symplify\\SimplePhpDocParser\\' => array($vendorDir . '/symplify/simple-php-doc-parser/src'),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2
|
||||
class ComposerAutoloaderInit6df79435bbacb5d1ffde7458ef87638b
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6df79435bbacb5d1ffde7458ef87638b', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6df79435bbacb5d1ffde7458ef87638b', '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\ComposerStaticInit001605771ad1511aeb8def7bcf5543b2::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,19 +42,19 @@ class ComposerAutoloaderInit001605771ad1511aeb8def7bcf5543b2
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit001605771ad1511aeb8def7bcf5543b2::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire001605771ad1511aeb8def7bcf5543b2($fileIdentifier, $file);
|
||||
composerRequire6df79435bbacb5d1ffde7458ef87638b($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire001605771ad1511aeb8def7bcf5543b2($fileIdentifier, $file)
|
||||
function composerRequire6df79435bbacb5d1ffde7458ef87638b($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
||||
class ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
|
@ -28,7 +28,6 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
public static $prefixLengthsPsr4 = array (
|
||||
'S' =>
|
||||
array (
|
||||
'Symplify\\SymfonyPhpConfig\\' => 26,
|
||||
'Symplify\\RuleDocGenerator\\' => 26,
|
||||
'Ssch\\TYPO3Rector\\PHPStan\\' => 25,
|
||||
'Ssch\\TYPO3Rector\\' => 17,
|
||||
|
@ -50,6 +49,7 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
'RectorPrefix20211206\\Webmozart\\Assert\\' => 38,
|
||||
'RectorPrefix20211206\\Symplify\\VendorPatches\\' => 44,
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\' => 45,
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\' => 47,
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\' => 46,
|
||||
'RectorPrefix20211206\\Symplify\\Skipper\\' => 38,
|
||||
'RectorPrefix20211206\\Symplify\\SimplePhpDocParser\\' => 49,
|
||||
|
@ -110,10 +110,6 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'Symplify\\SymfonyPhpConfig\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/symfony-php-config/src',
|
||||
),
|
||||
'Symplify\\RuleDocGenerator\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src',
|
||||
|
@ -188,6 +184,10 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/symplify-kernel/src',
|
||||
),
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/symfony-php-config/src',
|
||||
),
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symplify/smart-file-system/src',
|
||||
|
@ -1686,6 +1686,8 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\Normalizer\\PathNormalizer' => __DIR__ . '/..' . '/symplify/smart-file-system/src/Normalizer/PathNormalizer.php',
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\SmartFileInfo' => __DIR__ . '/..' . '/symplify/smart-file-system/src/SmartFileInfo.php',
|
||||
'RectorPrefix20211206\\Symplify\\SmartFileSystem\\SmartFileSystem' => __DIR__ . '/..' . '/symplify/smart-file-system/src/SmartFileSystem.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\Reflection\\ArgumentAndParameterFactory' => __DIR__ . '/..' . '/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\ValueObjectInliner' => __DIR__ . '/..' . '/symplify/symfony-php-config/src/ValueObjectInliner.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\Config\\Loader\\ParameterMergingLoaderFactory' => __DIR__ . '/..' . '/symplify/symplify-kernel/src/Config/Loader/ParameterMergingLoaderFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\ContainerBuilderFactory' => __DIR__ . '/..' . '/symplify/symplify-kernel/src/ContainerBuilderFactory.php',
|
||||
'RectorPrefix20211206\\Symplify\\SymplifyKernel\\Contract\\Config\\LoaderFactoryInterface' => __DIR__ . '/..' . '/symplify/symplify-kernel/src/Contract/Config/LoaderFactoryInterface.php',
|
||||
|
@ -3291,6 +3293,7 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
'Rector\\Symfony\\Rector\\StaticCall\\ParseFileRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php',
|
||||
'Rector\\Symfony\\Rector\\StaticCall\\ProcessBuilderInstanceRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php',
|
||||
'Rector\\Symfony\\Set\\JMSSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/JMSSetList.php',
|
||||
'Rector\\Symfony\\Set\\SensiolabsSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SensiolabsSetList.php',
|
||||
'Rector\\Symfony\\Set\\SwiftmailerSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SwiftmailerSetList.php',
|
||||
'Rector\\Symfony\\Set\\SymfonyLevelSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SymfonyLevelSetList.php',
|
||||
'Rector\\Symfony\\Set\\SymfonySetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SymfonySetList.php',
|
||||
|
@ -3777,8 +3780,6 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
'Symplify\\RuleDocGenerator\\ValueObject\\CodeSample\\ConfiguredCodeSample' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/ValueObject/CodeSample/ConfiguredCodeSample.php',
|
||||
'Symplify\\RuleDocGenerator\\ValueObject\\CodeSample\\ExtraFileCodeSample' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/ValueObject/CodeSample/ExtraFileCodeSample.php',
|
||||
'Symplify\\RuleDocGenerator\\ValueObject\\RuleDefinition' => __DIR__ . '/..' . '/symplify/rule-doc-generator-contracts/src/ValueObject/RuleDefinition.php',
|
||||
'Symplify\\SymfonyPhpConfig\\Reflection\\ArgumentAndParameterFactory' => __DIR__ . '/..' . '/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php',
|
||||
'Symplify\\SymfonyPhpConfig\\ValueObjectInliner' => __DIR__ . '/..' . '/symplify/symfony-php-config/src/ValueObjectInliner.php',
|
||||
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
|
||||
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
||||
);
|
||||
|
@ -3786,9 +3787,9 @@ class ComposerStaticInit001605771ad1511aeb8def7bcf5543b2
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit001605771ad1511aeb8def7bcf5543b2::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit001605771ad1511aeb8def7bcf5543b2::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit001605771ad1511aeb8def7bcf5543b2::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6df79435bbacb5d1ffde7458ef87638b::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
|
@ -294,9 +294,7 @@
|
|||
"time": "2017-06-12T01:10:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"patches_applied": [
|
||||
"https:\/\/raw.githubusercontent.com\/rectorphp\/vendor-patches\/master\/danielstjules-stringy-src-stringy-php.patch"
|
||||
]
|
||||
"patches_applied": []
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -2480,23 +2478,23 @@
|
|||
},
|
||||
{
|
||||
"name": "rector\/rector-symfony",
|
||||
"version": "0.11.44",
|
||||
"version_normalized": "0.11.44.0",
|
||||
"version": "0.11.45",
|
||||
"version_normalized": "0.11.45.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "e08648dcecb8c97d1ab62b796f8d71f3d47f493b"
|
||||
"reference": "1c76befd5a64d57bd0732aad989b06fd3ed3cb33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/e08648dcecb8c97d1ab62b796f8d71f3d47f493b",
|
||||
"reference": "e08648dcecb8c97d1ab62b796f8d71f3d47f493b",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/1c76befd5a64d57bd0732aad989b06fd3ed3cb33",
|
||||
"reference": "1c76befd5a64d57bd0732aad989b06fd3ed3cb33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"danielstjules\/stringy": "^3.1",
|
||||
"ext-xml": "*",
|
||||
"php": ">=8.0"
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"conflict": {
|
||||
"rector\/rector": "<0.11"
|
||||
|
@ -2517,12 +2515,15 @@
|
|||
"symplify\/phpstan-rules": "^10.0",
|
||||
"symplify\/rule-doc-generator": "^10.0"
|
||||
},
|
||||
"time": "2021-11-30T13:38:22+00:00",
|
||||
"time": "2021-12-06T20:57:19+00:00",
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
"patches": {
|
||||
"symfony\/dependency-injection": [
|
||||
"patches\/symfony-dependency-injection-loader-configurator-servicesconfigurator-php.patch"
|
||||
],
|
||||
"danielstjules\/stringy": [
|
||||
"patches\/danielstjules-stringy-src-stringy-php.patch"
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
|
@ -2547,7 +2548,7 @@
|
|||
"description": "Rector upgrades rules for Symfony Framework",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues",
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.44"
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.45"
|
||||
},
|
||||
"install-path": "..\/rector\/rector-symfony"
|
||||
},
|
||||
|
@ -5195,7 +5196,7 @@
|
|||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symplify\\SymfonyPhpConfig\\": "src"
|
||||
"RectorPrefix20211206\\Symplify\\SymfonyPhpConfig\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,6 @@ This file was automatically generated by Composer Patches (https://github.com/cw
|
|||
Patches applied to this directory:
|
||||
|
||||
0
|
||||
Source: https://raw.githubusercontent.com/rectorphp/vendor-patches/master/danielstjules-stringy-src-stringy-php.patch
|
||||
Source: patches/danielstjules-stringy-src-stringy-php.patch
|
||||
|
||||
|
||||
|
|
|
@ -226,7 +226,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
*
|
||||
* @return int The number of characters in the string, given the encoding
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
return $this->length();
|
||||
|
@ -383,7 +382,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
*
|
||||
* @return \ArrayIterator An iterator for the characters in the string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator($this->chars());
|
||||
|
@ -724,7 +722,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
* @param mixed $offset The index to check
|
||||
* @return boolean Whether or not the index exists
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
$length = $this->length();
|
||||
|
@ -745,7 +742,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
* @throws \OutOfBoundsException If the positive or negative offset does
|
||||
* not exist
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
$offset = (int) $offset;
|
||||
|
@ -763,7 +759,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
* @param mixed $value Value to set
|
||||
* @throws \Exception When called
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
// Stringy is immutable, cannot directly set char
|
||||
|
@ -776,7 +771,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||
* @param mixed $offset The index of the character
|
||||
* @throws \Exception When called
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
// Don't allow directly modifying the string
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), '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' => '0.11.40'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.14'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.55'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), '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' => '0.11.23'), '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' => '0.11.44'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.31'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), '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' => '0.11.40'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.14'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.55'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.7'), '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' => '0.11.23'), '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' => '0.11.45'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.31'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ use Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector;
|
|||
use Rector\CakePHP\ValueObject\ArrayToFluentCall;
|
||||
use Rector\CakePHP\ValueObject\FactoryMethod;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
use RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::ARRAYS_TO_FLUENT_CALLS => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\ArrayToFluentCall('Cake\\ORM\\Association', [
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::ARRAYS_TO_FLUENT_CALLS => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\ArrayToFluentCall('Cake\\ORM\\Association', [
|
||||
'bindingKey' => 'setBindingKey',
|
||||
'cascadeCallbacks' => 'setCascadeCallbacks',
|
||||
'className' => 'setClassName',
|
||||
|
@ -48,5 +48,5 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
|
|||
# BelongsToMany only
|
||||
'targetForeignKey' => 'setTargetForeignKey',
|
||||
'through' => 'setThrough',
|
||||
]), new \Rector\CakePHP\ValueObject\ArrayToFluentCall('Cake\\ORM\\Query', ['fields' => 'select', 'conditions' => 'where', 'join' => 'join', 'order' => 'order', 'limit' => 'limit', 'offset' => 'offset', 'group' => 'group', 'having' => 'having', 'contain' => 'contain', 'page' => 'page'])]), \Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::FACTORY_METHODS => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'belongsTo', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'belongsToMany', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'hasMany', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'hasOne', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'find', 'Cake\\ORM\\Query', 2)])]]);
|
||||
]), new \Rector\CakePHP\ValueObject\ArrayToFluentCall('Cake\\ORM\\Query', ['fields' => 'select', 'conditions' => 'where', 'join' => 'join', 'order' => 'order', 'limit' => 'limit', 'offset' => 'offset', 'group' => 'group', 'having' => 'having', 'contain' => 'contain', 'page' => 'page'])]), \Rector\CakePHP\Rector\MethodCall\ArrayToFluentCallRector::FACTORY_METHODS => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'belongsTo', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'belongsToMany', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'hasMany', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'hasOne', 'Cake\\ORM\\Association', 2), new \Rector\CakePHP\ValueObject\FactoryMethod('Cake\\ORM\\Table', 'find', 'Cake\\ORM\\Query', 2)])]]);
|
||||
};
|
||||
|
|
|
@ -16,10 +16,10 @@ use Rector\Transform\ValueObject\PropertyFetchToMethodCall;
|
|||
use Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector;
|
||||
use Rector\Visibility\ValueObject\ChangeMethodVisibility;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
use RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector::class)->call('configure', [[\Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector::PROPERTIES_TO_METHOD_CALLS => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
$services->set(\Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector::class)->call('configure', [[\Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector::PROPERTIES_TO_METHOD_CALLS => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
// source: https://book.cakephp.org/3.0/en/appendices/3-4-migration-guide.html
|
||||
new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('Cake\\Network\\Request', 'params', 'getAttribute', null, ['params']),
|
||||
new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('Cake\\Network\\Request', 'data', 'getData'),
|
||||
|
@ -29,8 +29,8 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
|
|||
new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('Cake\\Network\\Request', 'webroot', 'getAttribute', null, ['webroot']),
|
||||
new \Rector\Transform\ValueObject\PropertyFetchToMethodCall('Cake\\Network\\Request', 'here', 'getAttribute', null, ['here']),
|
||||
])]]);
|
||||
$services->set(\Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector::class)->call('configure', [[\Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector::RENAMED_PROPERTIES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\RenameProperty('Cake\\Network\\Request', '_session', 'session')])]]);
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::UNPREFIXED_METHODS_TO_GET_SET => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
$services->set(\Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector::class)->call('configure', [[\Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector::RENAMED_PROPERTIES => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\RenameProperty('Cake\\Network\\Request', '_session', 'session')])]]);
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::UNPREFIXED_METHODS_TO_GET_SET => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Core\\InstanceConfigTrait', 'config', null, null, 2, 'array'),
|
||||
new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Core\\StaticConfigTrait', 'config', null, null, 2, 'array'),
|
||||
new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\ConsoleOptionParser', 'command'),
|
||||
|
@ -131,7 +131,7 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
|
|||
new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\ViewBuilder', 'className'),
|
||||
new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\ViewBuilder', 'autoLayout', 'isAutoLayoutEnabled', 'enableAutoLayout'),
|
||||
])]]);
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Network\\Request', 'param', 'getParam'),
|
||||
new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Network\\Request', 'data', 'getData'),
|
||||
new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Network\\Request', 'query', 'getQuery'),
|
||||
|
@ -172,6 +172,6 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
|
|||
new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Routing\\Route\\Route', 'parse', 'parseRequest'),
|
||||
new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Routing\\Router', 'parse', 'parseRequest'),
|
||||
])]]);
|
||||
$services->set(\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::class)->call('configure', [[\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::METHOD_VISIBILITIES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Visibility\ValueObject\ChangeMethodVisibility('Cake\\Mailer\\MailerAwareTrait', 'getMailer', \Rector\Core\ValueObject\Visibility::PROTECTED), new \Rector\Visibility\ValueObject\ChangeMethodVisibility('Cake\\View\\CellTrait', 'cell', \Rector\Core\ValueObject\Visibility::PROTECTED)])]]);
|
||||
$services->set(\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::class)->call('configure', [[\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::METHOD_VISIBILITIES => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Visibility\ValueObject\ChangeMethodVisibility('Cake\\Mailer\\MailerAwareTrait', 'getMailer', \Rector\Core\ValueObject\Visibility::PROTECTED), new \Rector\Visibility\ValueObject\ChangeMethodVisibility('Cake\\View\\CellTrait', 'cell', \Rector\Core\ValueObject\Visibility::PROTECTED)])]]);
|
||||
$services->set(\Rector\Renaming\Rector\Name\RenameClassRector::class)->call('configure', [[\Rector\Renaming\Rector\Name\RenameClassRector::OLD_TO_NEW_CLASSES => ['Cake\\Database\\Schema\\Table' => 'Cake\\Database\\Schema\\TableSchema']]]);
|
||||
};
|
||||
|
|
|
@ -9,11 +9,11 @@ use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
|||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
use RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
# source: https://book.cakephp.org/3.0/en/appendices/3-5-migration-guide.html
|
||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Renaming\Rector\Name\RenameClassRector::class)->call('configure', [[\Rector\Renaming\Rector\Name\RenameClassRector::OLD_TO_NEW_CLASSES => ['Cake\\Http\\Client\\CookieCollection' => 'Cake\\Http\\Cookie\\CookieCollection', 'Cake\\Console\\ShellDispatcher' => 'Cake\\Console\\CommandRunner']]]);
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'column', 'getColumn'), new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'constraint', 'getConstraint'), new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'index', 'getIndex')])]]);
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::UNPREFIXED_METHODS_TO_GET_SET => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Cache\\Cache', 'config'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Cache\\Cache', 'registry'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\Shell', 'io'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\ConsoleIo', 'outputAs'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\ConsoleOutput', 'outputAs'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Connection', 'logger'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\TypedResultInterface', 'returnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\TypedResultTrait', 'returnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Log\\LoggingStatement', 'logger'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Datasource\\ModelAwareTrait', 'modelType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Query', 'valueBinder', 'getValueBinder', 'valueBinder'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Schema\\TableSchema', 'columnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Datasource\\QueryTrait', 'eagerLoaded', 'isEagerLoaded', 'eagerLoaded'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Event\\EventDispatcherInterface', 'eventManager'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Event\\EventDispatcherTrait', 'eventManager'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Error\\Debugger', 'outputAs', 'getOutputFormat', 'setOutputFormat'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Http\\ServerRequest', 'env', 'getEnv', 'withEnv'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Http\\ServerRequest', 'charset', 'getCharset', 'withCharset'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'locale'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'translator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'defaultLocale'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'defaultFormatter'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\Association\\BelongsToMany', 'sort'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\LocatorAwareTrait', 'tableLocator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\Table', 'validator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteBuilder', 'extensions'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteBuilder', 'routeClass'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteCollection', 'extensions'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\TestSuite\\TestFixture', 'schema'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Utility\\Security', 'salt'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'template'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'layout'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'theme'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'templatePath'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'layoutPath'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'autoLayout', 'isAutoLayoutEnabled', 'enableAutoLayout')])]]);
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'column', 'getColumn'), new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'constraint', 'getConstraint'), new \Rector\Renaming\ValueObject\MethodCallRename('Cake\\Database\\Schema\\TableSchema', 'index', 'getIndex')])]]);
|
||||
$services->set(\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::class)->call('configure', [[\Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector::UNPREFIXED_METHODS_TO_GET_SET => \RectorPrefix20211206\Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Cache\\Cache', 'config'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Cache\\Cache', 'registry'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\Shell', 'io'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\ConsoleIo', 'outputAs'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Console\\ConsoleOutput', 'outputAs'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Connection', 'logger'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\TypedResultInterface', 'returnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\TypedResultTrait', 'returnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Log\\LoggingStatement', 'logger'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Datasource\\ModelAwareTrait', 'modelType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Query', 'valueBinder', 'getValueBinder', 'valueBinder'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Database\\Schema\\TableSchema', 'columnType'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Datasource\\QueryTrait', 'eagerLoaded', 'isEagerLoaded', 'eagerLoaded'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Event\\EventDispatcherInterface', 'eventManager'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Event\\EventDispatcherTrait', 'eventManager'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Error\\Debugger', 'outputAs', 'getOutputFormat', 'setOutputFormat'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Http\\ServerRequest', 'env', 'getEnv', 'withEnv'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Http\\ServerRequest', 'charset', 'getCharset', 'withCharset'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'locale'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'translator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'defaultLocale'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\I18n\\I18n', 'defaultFormatter'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\Association\\BelongsToMany', 'sort'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\LocatorAwareTrait', 'tableLocator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\ORM\\Table', 'validator'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteBuilder', 'extensions'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteBuilder', 'routeClass'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Routing\\RouteCollection', 'extensions'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\TestSuite\\TestFixture', 'schema'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\Utility\\Security', 'salt'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'template'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'layout'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'theme'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'templatePath'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'layoutPath'), new \Rector\CakePHP\ValueObject\ModalToGetSet('Cake\\View\\View', 'autoLayout', 'isAutoLayoutEnabled', 'enableAutoLayout')])]]);
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue