diff --git a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/command_get_with_type.php.inc b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/command_get_with_type.php.inc index db100474..2bad5cbd 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/command_get_with_type.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/command_get_with_type.php.inc @@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; final class CommandGetWithType extends ContainerAwareCommand { - public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) + public function __construct(private readonly \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) { parent::__construct(); } diff --git a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_constructor_command_get_with_type.php.inc b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_constructor_command_get_with_type.php.inc index a2d064b7..8c970c4c 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_constructor_command_get_with_type.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_constructor_command_get_with_type.php.inc @@ -32,7 +32,7 @@ final class IncludeConstructorCommandGetWithType extends ContainerAwareCommand { private string $value; - public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) + public function __construct(private readonly \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) { $this->value = 'some'; parent::__construct(); diff --git a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_get_container.php.inc b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_get_container.php.inc index 13cbf109..3c7676e6 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_get_container.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/CommandGetByTypeToConstructorInjectionRector/Fixture/include_get_container.php.inc @@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; final class IncludeGetContainer extends ContainerAwareCommand { - public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) + public function __construct(private readonly \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\CommandGetByTypeToConstructorInjectionRector\Fixture\SomeService $someService) { parent::__construct(); } diff --git a/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/controller_get_with_type.php.inc b/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/controller_get_with_type.php.inc index c9cca181..4c141c40 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/controller_get_with_type.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/controller_get_with_type.php.inc @@ -24,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; final class ControllerGetWithType extends Controller { - public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService $someService) + public function __construct(private readonly \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService $someService) { } public function configure() diff --git a/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/cover_container_property.php.inc b/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/cover_container_property.php.inc index 0b57fc38..5447a44e 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/cover_container_property.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/ControllerGetByTypeToConstructorInjectionRector/Fixture/cover_container_property.php.inc @@ -24,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; final class CoverContainerProperty extends Controller { - public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService $someService) + public function __construct(private readonly \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService $someService) { } public function configure() diff --git a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/command_validator.php.inc b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/command_validator.php.inc index e2b53e6d..eee09ad6 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/command_validator.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/command_validator.php.inc @@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; final class CommandValidator extends ContainerAwareCommand { - public function __construct(private \Symfony\Component\Validator\Validator\ValidatorInterface $validator) + public function __construct(private readonly \Symfony\Component\Validator\Validator\ValidatorInterface $validator) { } public function configure() diff --git a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/event_dispatcher_controller.php.inc b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/event_dispatcher_controller.php.inc index cbb790ab..3ff1e3d4 100644 --- a/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/event_dispatcher_controller.php.inc +++ b/rules-tests/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector/Fixture/event_dispatcher_controller.php.inc @@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; final class EventDispatcherController extends Controller { - public function __construct(private \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $eventDispatcher) + public function __construct(private readonly \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $eventDispatcher) { } public function configure() diff --git a/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture.php.inc b/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture.php.inc index 1ddef0ae..011324ca 100644 --- a/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture.php.inc +++ b/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture.php.inc @@ -26,7 +26,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; class ClassWithNamedService extends Controller { - public function __construct(private \stdClass $stdClass) + public function __construct(private readonly \stdClass $stdClass) { } public function render() diff --git a/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture2.php.inc b/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture2.php.inc index d4dee14e..2ade138e 100644 --- a/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture2.php.inc +++ b/rules-tests/Symfony28/Rector/MethodCall/GetToConstructorInjectionRector/Fixture/fixture2.php.inc @@ -27,7 +27,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; final class ClassWithNamedService2 extends Controller { - public function __construct(private \Rector\Symfony\Tests\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector\Source\Something $something, private \Rector\Symfony\Tests\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector\Source\Anything $anything) + public function __construct(private readonly \Rector\Symfony\Tests\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector\Source\Something $something, private readonly \Rector\Symfony\Tests\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector\Source\Anything $anything) { } public function render() diff --git a/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/dispatch_message.php.inc b/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/dispatch_message.php.inc index dcc73e29..5383009a 100644 --- a/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/dispatch_message.php.inc +++ b/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/dispatch_message.php.inc @@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; final class DispatchMessage extends AbstractController { - public function __construct(private \Symfony\Component\Messenger\MessageBusInterface $messageBus) + public function __construct(private readonly \Symfony\Component\Messenger\MessageBusInterface $messageBus) { } public function run() diff --git a/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/some_class.php.inc b/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/some_class.php.inc index 96f8daf1..ee79761c 100644 --- a/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/some_class.php.inc +++ b/rules-tests/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector/Fixture/some_class.php.inc @@ -24,7 +24,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; final class SomeController extends AbstractController { - public function __construct(private \Doctrine\Persistence\ManagerRegistry $managerRegistry) + public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) { } public function run()