mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 08:50:50 +00:00
Remove old PHPSpec 3 and 4 sets (#1902)
This commit is contained in:
parent
e2cc867255
commit
4c890be2c1
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(RenameMethodRector::class)
|
||||
->configure([
|
||||
// @see http://www.phpspec.net/en/stable/manual/upgrading-to-phpspec-3.html
|
||||
new MethodCallRename('PhpSpec\ServiceContainer', 'set', 'define'),
|
||||
new MethodCallRename('PhpSpec\ServiceContainer', 'setShared', 'define'),
|
||||
]);
|
||||
|
||||
$services->set(RenameClassRector::class)
|
||||
->configure([
|
||||
'PhpSpec\Console\IO' => 'PhpSpec\Console\ConsoleIO',
|
||||
'PhpSpec\IO\IOInterface' => 'PhpSpec\IO\IO',
|
||||
'PhpSpec\Locator\ResourceInterface' => 'PhpSpec\Locator\Resource',
|
||||
'PhpSpec\Locator\ResourceLocatorInterface' => 'PhpSpec\Locator\ResourceLocator',
|
||||
'PhpSpec\Formatter\Presenter\PresenterInterface' => 'PhpSpec\Formatter\Presenter\Presenter',
|
||||
'PhpSpec\CodeGenerator\Generator\GeneratorInterface' => 'PhpSpec\CodeGenerator\Generator\Generator',
|
||||
'PhpSpec\Extension\ExtensionInterface' => 'PhpSpec\Extension',
|
||||
'Phpspec\CodeAnalysis\AccessInspectorInterface' => 'Phpspec\CodeAnalysis\AccessInspector',
|
||||
'Phpspec\Event\EventInterface' => 'Phpspec\Event\PhpSpecEvent',
|
||||
'PhpSpec\Formatter\Presenter\Differ\EngineInterface' => 'PhpSpec\Formatter\Presenter\Differ\DifferEngine',
|
||||
'PhpSpec\Matcher\MatcherInterface' => 'PhpSpec\Matcher\Matcher',
|
||||
'PhpSpec\Matcher\MatchersProviderInterface' => 'PhpSpec\Matcher\MatchersProvider',
|
||||
'PhpSpec\SpecificationInterface' => 'PhpSpec\Specification',
|
||||
'PhpSpec\Runner\Maintainer\MaintainerInterface' => 'PhpSpec\Runner\Maintainer\Maintainer',
|
||||
]);
|
||||
};
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PHPStan\Type\ArrayType;
|
||||
use PHPStan\Type\MixedType;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$arrayType = new ArrayType(new MixedType(), new MixedType());
|
||||
|
||||
$services->set(AddReturnTypeDeclarationRector::class)
|
||||
->configure([new AddReturnTypeDeclaration('PhpSpec\ObjectBehavior', 'getMatchers', $arrayType)]);
|
||||
};
|
|
@ -73,16 +73,6 @@ final class SetList implements SetListInterface
|
|||
*/
|
||||
public const ORDER = __DIR__ . '/../../../config/set/order.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PHPSPEC_30 = __DIR__ . '/../../../config/set/phpspec30.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PHPSPEC_40 = __DIR__ . '/../../../config/set/phpspec40.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user