[composer] remove dependency on nette-to-symfony, very niche package that would require much work to be used in public (#290)

This commit is contained in:
Tomas Votruba 2021-06-25 18:59:21 +02:00 committed by GitHub
parent edd78eb310
commit 68c2bcda1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1 additions and 63 deletions

View File

@ -22,7 +22,6 @@ jobs:
repository_name:
# must be repository name, e.g. https://github.com/rectorphp/rector-nette
- rectorphp/rector-nette
- rectorphp/rector-nette-to-symfony
- rectorphp/rector-symfony
- rectorphp/rector-laravel
- rectorphp/rector-phpunit

View File

@ -27,7 +27,6 @@
"rector/rector-symfony": "*",
"rector/rector-doctrine": "*",
"rector/rector-nette": "*",
"rector/rector-nette-to-symfony": "*",
"rector/rector-cakephp": "*"
}
}

View File

@ -26,7 +26,6 @@
"rector/rector-doctrine": "^0.11.5",
"rector/rector-laravel": "^0.11.1",
"rector/rector-nette": "^0.11.5",
"rector/rector-nette-to-symfony": "^0.11.3",
"rector/rector-phpunit": "^0.11.1",
"rector/rector-symfony": "^0.11.6",
"sebastian/diff": "^4.0.4",

View File

@ -1,44 +0,0 @@
<?php
declare(strict_types=1);
use Rector\Core\ValueObject\Visibility;
use Rector\NetteToSymfony\Rector\MethodCall\WrapTransParameterNameRector;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector;
use Rector\Visibility\ValueObject\ChangeMethodVisibility;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ChangeMethodVisibilityRector::class)
->call('configure', [[
ChangeMethodVisibilityRector::METHOD_VISIBILITIES => ValueObjectInliner::inline([
new ChangeMethodVisibility('Kdyby\Events\Subscriber', 'getSubscribedEvents', Visibility::STATIC),
]),
]]);
$services->set(RenameMethodRector::class)
->call('configure', [[
RenameMethodRector::METHOD_CALL_RENAMES => ValueObjectInliner::inline([
new MethodCallRename('Kdyby\Translation\Translator', 'translate', 'trans'),
new MethodCallRename('Kdyby\RabbitMq\IConsumer', 'process', 'execute'),
]),
]]);
$services->set(RenameClassRector::class)
->call('configure', [[
RenameClassRector::OLD_TO_NEW_CLASSES => [
'Kdyby\RabbitMq\IConsumer' => 'OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface',
'Kdyby\RabbitMq\IProducer' => 'OldSound\RabbitMqBundle\RabbitMq\ProducerInterface',
'Kdyby\Monolog\Logger' => 'Psr\Log\LoggerInterface',
'Kdyby\Events\Subscriber' => 'Symfony\Component\EventDispatcher\EventSubscriberInterface',
'Kdyby\Translation\Translator' => 'Symfony\Contracts\Translation\TranslatorInterface',
],
]]);
$services->set(WrapTransParameterNameRector::class);
};

View File

@ -29,9 +29,3 @@
* https://github.com/rectorphp/rector-cakephp
* ![](https://github.com/rectorphp/rector-cakephp/actions/workflows/tests.yaml/badge.svg)
* ![](https://github.com/rectorphp/rector-cakephp/actions/workflows/code_analysis.yaml/badge.svg)
## Nette to Symfony
* https://github.com/rectorphp/rector-nette-to-symfony
* ![](https://github.com/rectorphp/rector-nette-to-symfony/actions/workflows/tests.yaml/badge.svg)
* ![](https://github.com/rectorphp/rector-nette-to-symfony/actions/workflows/code_analysis.yaml/badge.svg)

View File

@ -6,14 +6,12 @@ namespace Rector\NodeCollector\NodeVisitor;
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use Rector\NodeCollector\NodeCollector\NodeRepository;
use Rector\NodeCollector\NodeCollector\ParsedNodeCollector;
use Rector\NodeCollector\NodeCollector\ParsedPropertyFetchNodeCollector;
final class NodeCollectorNodeVisitor extends NodeVisitorAbstract
{
public function __construct(
private NodeRepository $nodeRepository,
private ParsedNodeCollector $parsedNodeCollector,
private ParsedPropertyFetchNodeCollector $parsedPropertyFetchNodeCollector
) {

View File

@ -58,11 +58,6 @@ final class SetList implements SetListInterface
*/
public const GMAGICK_TO_IMAGICK = __DIR__ . '/../../../config/set/gmagick_to_imagick.php';
/**
* @var string
*/
public const KDYBY_TO_SYMFONY = __DIR__ . '/../../../config/set/kdyby-to-symfony.php';
/**
* @var string
*/

View File

@ -9,7 +9,7 @@ use PhpParser\Node\Stmt\Interface_;
use Rector\Core\Rector\AbstractRector;
use Rector\FileSystemRector\ValueObject\AddedFileWithNodes;
use Rector\FileSystemRector\ValueObjectFactory\AddedFileWithNodesFactory;
use Rector\NetteToSymfony\NodeAnalyzer\NetteControlFactoryInterfaceAnalyzer;
use Rector\Nette\NodeAnalyzer\Component\NetteControlFactoryInterfaceAnalyzer;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;

View File

@ -12,7 +12,6 @@ use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ObjectType;
use Rector\Core\NodeManipulator\ClassMethodManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeCollector\ScopeResolver\ParentClassScopeResolver;
use Rector\NodeCollector\StaticAnalyzer;
@ -28,7 +27,6 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
final class StaticCallOnNonStaticToInstanceCallRector extends AbstractRector
{
public function __construct(
private ClassMethodManipulator $classMethodManipulator,
private StaticAnalyzer $staticAnalyzer,
private ReflectionProvider $reflectionProvider,
private ParentClassScopeResolver $parentClassScopeResolver