Skip to content

Commit

Permalink
Updated Rector to commit fe4d90d829b8bd17eff843f0e3de7a5a9cf0e023
Browse files Browse the repository at this point in the history
rectorphp/rector-src@fe4d90d [DX] Remove complementary interface, as not practical (#4757)
  • Loading branch information
TomasVotruba committed Aug 10, 2023
1 parent f594570 commit 90a98ad
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 43 deletions.

This file was deleted.

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 = '0.17.11';
public const PACKAGE_VERSION = 'fe4d90d829b8bd17eff843f0e3de7a5a9cf0e023';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-10 11:50:12';
public const RELEASE_DATE = '2023-08-10 12:58:03';
/**
* @var int
*/
Expand Down
12 changes: 2 additions & 10 deletions src/Configuration/ConfigInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Core\FileSystem\InitFilePathsResolver;
use Rector\Core\Php\PhpVersionProvider;
use Rector\PostRector\Contract\Rector\ComplementaryRectorInterface;
use Rector\PostRector\Contract\Rector\PostRectorInterface;
use RectorPrefix202308\Symfony\Component\Console\Style\SymfonyStyle;
use RectorPrefix202308\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
Expand Down Expand Up @@ -41,11 +40,7 @@ public function __construct(iterable $rectors, InitFilePathsResolver $initFilePa
$this->initFilePathsResolver = $initFilePathsResolver;
$this->symfonyStyle = $symfonyStyle;
$this->phpVersionProvider = $phpVersionProvider;
if ($rectors instanceof RewindableGenerator) {
$this->rectors = \iterator_to_array($rectors->getIterator());
} else {
$this->rectors = $rectors;
}
$this->rectors = $rectors instanceof RewindableGenerator ? \iterator_to_array($rectors->getIterator()) : $rectors;
}
public function createConfig(string $projectDirectory) : void
{
Expand Down Expand Up @@ -77,10 +72,7 @@ public function areSomeRectorsLoaded() : bool
private function filterActiveRectors(array $rectors) : array
{
return \array_filter($rectors, static function (RectorInterface $rector) : bool {
if ($rector instanceof PostRectorInterface) {
return \false;
}
return !$rector instanceof ComplementaryRectorInterface;
return !$rector instanceof PostRectorInterface;
});
}
private function replacePhpLevelContents(string $rectorPhpTemplateContents) : string
Expand Down
6 changes: 1 addition & 5 deletions src/Console/Command/ListRulesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
use Rector\Core\Configuration\Option;
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\PostRector\Contract\Rector\ComplementaryRectorInterface;
use Rector\PostRector\Contract\Rector\PostRectorInterface;
use Rector\Skipper\SkipCriteriaResolver\SkippedClassResolver;
use RectorPrefix202308\Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -75,10 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
private function resolveRectorClasses() : array
{
$customRectors = \array_filter($this->rectors, static function (RectorInterface $rector) : bool {
if ($rector instanceof PostRectorInterface) {
return \false;
}
return !$rector instanceof ComplementaryRectorInterface;
return !$rector instanceof PostRectorInterface;
});
$rectorClasses = \array_map(static function (RectorInterface $rector) : string {
return \get_class($rector);
Expand Down
3 changes: 1 addition & 2 deletions src/NonPhpFile/Rector/RenameClassNonPhpRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
use Rector\Core\Configuration\RenamedClassesDataCollector;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use Rector\Core\Contract\Rector\NonPhpRectorInterface;
use Rector\PostRector\Contract\Rector\ComplementaryRectorInterface;
use Symplify\RuleDocGenerator\Contract\ConfigurableRuleInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use RectorPrefix202308\Webmozart\Assert\Assert;
final class RenameClassNonPhpRector implements NonPhpRectorInterface, ConfigurableRuleInterface, ConfigurableRectorInterface, ComplementaryRectorInterface
final class RenameClassNonPhpRector implements NonPhpRectorInterface, ConfigurableRuleInterface, ConfigurableRectorInterface
{
/**
* @readonly
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 ComposerAutoloaderInit16ae27751232a06317e2f21c28d3d598::getLoader();
return ComposerAutoloaderInitbfb8584841a8ff684295ce35ac926789::getLoader();
1 change: 0 additions & 1 deletion vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,6 @@
'Rector\\PostRector\\Application\\PostFileProcessor' => $baseDir . '/packages/PostRector/Application/PostFileProcessor.php',
'Rector\\PostRector\\Collector\\UseNodesToAddCollector' => $baseDir . '/packages/PostRector/Collector/UseNodesToAddCollector.php',
'Rector\\PostRector\\Contract\\Collector\\NodeCollectorInterface' => $baseDir . '/packages/PostRector/Contract/Collector/NodeCollectorInterface.php',
'Rector\\PostRector\\Contract\\Rector\\ComplementaryRectorInterface' => $baseDir . '/packages/PostRector/Contract/Rector/ComplementaryRectorInterface.php',
'Rector\\PostRector\\Contract\\Rector\\PostRectorDependencyInterface' => $baseDir . '/packages/PostRector/Contract/Rector/PostRectorDependencyInterface.php',
'Rector\\PostRector\\Contract\\Rector\\PostRectorInterface' => $baseDir . '/packages/PostRector/Contract/Rector/PostRectorInterface.php',
'Rector\\PostRector\\Rector\\AbstractPostRector' => $baseDir . '/packages/PostRector/Rector/AbstractPostRector.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 ComposerAutoloaderInit16ae27751232a06317e2f21c28d3d598
class ComposerAutoloaderInitbfb8584841a8ff684295ce35ac926789
{
private static $loader;

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

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

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

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

$filesToLoad = \Composer\Autoload\ComposerStaticInit16ae27751232a06317e2f21c28d3d598::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitbfb8584841a8ff684295ce35ac926789::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
9 changes: 4 additions & 5 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 ComposerStaticInit16ae27751232a06317e2f21c28d3d598
class ComposerStaticInitbfb8584841a8ff684295ce35ac926789
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -2554,7 +2554,6 @@ class ComposerStaticInit16ae27751232a06317e2f21c28d3d598
'Rector\\PostRector\\Application\\PostFileProcessor' => __DIR__ . '/../..' . '/packages/PostRector/Application/PostFileProcessor.php',
'Rector\\PostRector\\Collector\\UseNodesToAddCollector' => __DIR__ . '/../..' . '/packages/PostRector/Collector/UseNodesToAddCollector.php',
'Rector\\PostRector\\Contract\\Collector\\NodeCollectorInterface' => __DIR__ . '/../..' . '/packages/PostRector/Contract/Collector/NodeCollectorInterface.php',
'Rector\\PostRector\\Contract\\Rector\\ComplementaryRectorInterface' => __DIR__ . '/../..' . '/packages/PostRector/Contract/Rector/ComplementaryRectorInterface.php',
'Rector\\PostRector\\Contract\\Rector\\PostRectorDependencyInterface' => __DIR__ . '/../..' . '/packages/PostRector/Contract/Rector/PostRectorDependencyInterface.php',
'Rector\\PostRector\\Contract\\Rector\\PostRectorInterface' => __DIR__ . '/../..' . '/packages/PostRector/Contract/Rector/PostRectorInterface.php',
'Rector\\PostRector\\Rector\\AbstractPostRector' => __DIR__ . '/../..' . '/packages/PostRector/Rector/AbstractPostRector.php',
Expand Down Expand Up @@ -3000,9 +2999,9 @@ class ComposerStaticInit16ae27751232a06317e2f21c28d3d598
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit16ae27751232a06317e2f21c28d3d598::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit16ae27751232a06317e2f21c28d3d598::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit16ae27751232a06317e2f21c28d3d598::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitbfb8584841a8ff684295ce35ac926789::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbfb8584841a8ff684295ce35ac926789::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbfb8584841a8ff684295ce35ac926789::$classMap;

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

0 comments on commit 90a98ad

Please sign in to comment.