From 3a0fa9481a4dcceb1a3cad9e352d47bbc26eaed4 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 6 Jan 2025 17:11:37 +0700 Subject: [PATCH] Update GetBySymfonyStringToConstructorInjectionRector fixture test to cover rector-srv:tv-readonly-add-ctor --- composer.json | 2 +- .../Fixture/prefer_required_setter.php.inc | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 5bfccf2e..38a9e9e5 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "phpstan/phpstan": "^2.0", "phpstan/phpstan-webmozart-assert": "^2.0", "phpunit/phpunit": "^11.4", - "rector/rector-src": "dev-main", + "rector/rector-src": "dev-tv-readonly-add-ctor", "symfony/config": "^6.4", "symfony/dependency-injection": "^6.4", "symfony/http-kernel": "~6.3", diff --git a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/prefer_required_setter.php.inc b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/prefer_required_setter.php.inc index d5965603..56b71157 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/prefer_required_setter.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/prefer_required_setter.php.inc @@ -33,20 +33,17 @@ namespace Rector\Symfony\Tests\DependencyInjection\Rector\Class_\GetBySymfonyStr use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Symfony\Component\Validator\Validator\ValidatorInterface; class PreferRequiredSetter extends Controller { private EventDispatcherInterface $eventDispatcher; - - private ValidatorInterface $validator; + private \Symfony\Component\Validator\Validator\ValidatorInterface $validator; /** * @required */ public function autowire( - EventDispatcherInterface $eventDispatcher, - ValidatorInterface $validator + EventDispatcherInterface $eventDispatcher, \Symfony\Component\Validator\Validator\ValidatorInterface $validator ) { $this->eventDispatcher = $eventDispatcher; $this->validator = $validator;