Skip to content

Commit

Permalink
Updated Rector to commit 9e8ed6c33f39aa9d7d859fb39b6f2d0344cdea0d
Browse files Browse the repository at this point in the history
rectorphp/rector-src@9e8ed6c Remove SwapFuncCallArgumentsRector as keeps swaping to infinity, use custom rule instead (#4874)
  • Loading branch information
TomasVotruba committed Aug 28, 2023
1 parent 1b7113d commit dd562a4
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 186 deletions.
25 changes: 2 additions & 23 deletions docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 354 Rules Overview
# 353 Rules Overview

<br>

## Categories

- [Arguments](#arguments) (5)
- [Arguments](#arguments) (4)

- [CodeQuality](#codequality) (70)

Expand Down Expand Up @@ -138,27 +138,6 @@ Replaces defined map of arguments in defined methods and their calls.

<br>

### SwapFuncCallArgumentsRector

Reorder arguments in function calls

:wrench: **configure it!**

- class: [`Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector`](../rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php)

```diff
final class SomeClass
{
public function run()
{
- return some_function('one', 'two', 'three');
+ return some_function('three', 'two', 'one');
}
}
```

<br>

## CodeQuality

### AbsolutizeRequireAndIncludePathRector
Expand Down
110 changes: 0 additions & 110 deletions rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php

This file was deleted.

37 changes: 0 additions & 37 deletions rules/Arguments/ValueObject/SwapFuncCallArguments.php

This file was deleted.

4 changes: 4 additions & 0 deletions rules/Php80/Rector/Class_/AnnotationToAttributeRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use Rector\Php80\ValueObject\DoctrineTagAndAnnotationToAttribute;
use Rector\PhpAttribute\NodeFactory\PhpAttributeGroupFactory;
use Rector\PhpDocParser\PhpDocParser\PhpDocNodeTraverser;
use Rector\RectorGenerator\Exception\ConfigurationException;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down Expand Up @@ -127,6 +128,9 @@ public function getNodeTypes() : array
*/
public function refactor(Node $node) : ?Node
{
if ($this->annotationsToAttributes === []) {
throw new ConfigurationException(\sprintf('The "%s" rule requires configuration.', self::class));
}
$phpDocInfo = $this->phpDocInfoFactory->createFromNode($node);
if (!$phpDocInfo instanceof PhpDocInfo) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '2f38105001867c15fb1b2001767b37566428719f';
public const PACKAGE_VERSION = '9e8ed6c33f39aa9d7d859fb39b6f2d0344cdea0d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-28 13:59:30';
public const RELEASE_DATE = '2023-08-28 14:43:08';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitb1385f3edb8c9f0571c633e843dbc286::getLoader();
return ComposerAutoloaderInit3242d5514b8f61810061aee8e5f52c95::getLoader();
2 changes: 0 additions & 2 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,13 +933,11 @@
'Rector\\Arguments\\Rector\\ClassMethod\\ArgumentAdderRector' => $baseDir . '/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php',
'Rector\\Arguments\\Rector\\ClassMethod\\ReplaceArgumentDefaultValueRector' => $baseDir . '/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php',
'Rector\\Arguments\\Rector\\FuncCall\\FunctionArgumentDefaultValueReplacerRector' => $baseDir . '/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php',
'Rector\\Arguments\\Rector\\FuncCall\\SwapFuncCallArgumentsRector' => $baseDir . '/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php',
'Rector\\Arguments\\Rector\\MethodCall\\RemoveMethodCallParamRector' => $baseDir . '/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php',
'Rector\\Arguments\\ValueObject\\ArgumentAdder' => $baseDir . '/rules/Arguments/ValueObject/ArgumentAdder.php',
'Rector\\Arguments\\ValueObject\\RemoveMethodCallParam' => $baseDir . '/rules/Arguments/ValueObject/RemoveMethodCallParam.php',
'Rector\\Arguments\\ValueObject\\ReplaceArgumentDefaultValue' => $baseDir . '/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php',
'Rector\\Arguments\\ValueObject\\ReplaceFuncCallArgumentDefaultValue' => $baseDir . '/rules/Arguments/ValueObject/ReplaceFuncCallArgumentDefaultValue.php',
'Rector\\Arguments\\ValueObject\\SwapFuncCallArguments' => $baseDir . '/rules/Arguments/ValueObject/SwapFuncCallArguments.php',
'Rector\\BetterPhpDocParser\\Annotation\\AnnotationNaming' => $baseDir . '/packages/BetterPhpDocParser/Annotation/AnnotationNaming.php',
'Rector\\BetterPhpDocParser\\Attributes\\AttributeMirrorer' => $baseDir . '/packages/BetterPhpDocParser/Attributes/AttributeMirrorer.php',
'Rector\\BetterPhpDocParser\\Comment\\CommentsMerger' => $baseDir . '/packages/BetterPhpDocParser/Comment/CommentsMerger.php',
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitb1385f3edb8c9f0571c633e843dbc286
class ComposerAutoloaderInit3242d5514b8f61810061aee8e5f52c95
{
private static $loader;

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

spl_autoload_register(array('ComposerAutoloaderInitb1385f3edb8c9f0571c633e843dbc286', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit3242d5514b8f61810061aee8e5f52c95', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitb1385f3edb8c9f0571c633e843dbc286', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit3242d5514b8f61810061aee8e5f52c95', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit3242d5514b8f61810061aee8e5f52c95::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit3242d5514b8f61810061aee8e5f52c95::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
10 changes: 4 additions & 6 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286
class ComposerStaticInit3242d5514b8f61810061aee8e5f52c95
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -1153,13 +1153,11 @@ class ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286
'Rector\\Arguments\\Rector\\ClassMethod\\ArgumentAdderRector' => __DIR__ . '/../..' . '/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php',
'Rector\\Arguments\\Rector\\ClassMethod\\ReplaceArgumentDefaultValueRector' => __DIR__ . '/../..' . '/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php',
'Rector\\Arguments\\Rector\\FuncCall\\FunctionArgumentDefaultValueReplacerRector' => __DIR__ . '/../..' . '/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php',
'Rector\\Arguments\\Rector\\FuncCall\\SwapFuncCallArgumentsRector' => __DIR__ . '/../..' . '/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php',
'Rector\\Arguments\\Rector\\MethodCall\\RemoveMethodCallParamRector' => __DIR__ . '/../..' . '/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php',
'Rector\\Arguments\\ValueObject\\ArgumentAdder' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/ArgumentAdder.php',
'Rector\\Arguments\\ValueObject\\RemoveMethodCallParam' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/RemoveMethodCallParam.php',
'Rector\\Arguments\\ValueObject\\ReplaceArgumentDefaultValue' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php',
'Rector\\Arguments\\ValueObject\\ReplaceFuncCallArgumentDefaultValue' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/ReplaceFuncCallArgumentDefaultValue.php',
'Rector\\Arguments\\ValueObject\\SwapFuncCallArguments' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/SwapFuncCallArguments.php',
'Rector\\BetterPhpDocParser\\Annotation\\AnnotationNaming' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Annotation/AnnotationNaming.php',
'Rector\\BetterPhpDocParser\\Attributes\\AttributeMirrorer' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Attributes/AttributeMirrorer.php',
'Rector\\BetterPhpDocParser\\Comment\\CommentsMerger' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Comment/CommentsMerger.php',
Expand Down Expand Up @@ -2608,9 +2606,9 @@ class ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb1385f3edb8c9f0571c633e843dbc286::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit3242d5514b8f61810061aee8e5f52c95::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3242d5514b8f61810061aee8e5f52c95::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3242d5514b8f61810061aee8e5f52c95::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit dd562a4

Please sign in to comment.