From 5394ff63991748813945bb7527ac48a104cfbb3f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 6 Jan 2025 10:31:25 +0100 Subject: [PATCH] Add constructor fixture, just to verify alter behavior --- .../Fixture/strick_with_constructor.php.inc | 43 +++++++++++++++++++ .../config/configured_rule.php | 6 +-- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 tests/Issues/AddClassDependency/Fixture/strick_with_constructor.php.inc diff --git a/tests/Issues/AddClassDependency/Fixture/strick_with_constructor.php.inc b/tests/Issues/AddClassDependency/Fixture/strick_with_constructor.php.inc new file mode 100644 index 0000000000..11e65dfb87 --- /dev/null +++ b/tests/Issues/AddClassDependency/Fixture/strick_with_constructor.php.inc @@ -0,0 +1,43 @@ +get('validator'); + } +} + +?> +----- +validator; + } +} + +?> diff --git a/tests/Issues/AddClassDependency/config/configured_rule.php b/tests/Issues/AddClassDependency/config/configured_rule.php index cde0c6573b..1b1b9d6ab2 100644 --- a/tests/Issues/AddClassDependency/config/configured_rule.php +++ b/tests/Issues/AddClassDependency/config/configured_rule.php @@ -2,10 +2,8 @@ declare(strict_types=1); -use Rector\Symfony\DependencyInjection\Rector\Class_\GetBySymfonyStringToConstructorInjectionRector; use Rector\Config\RectorConfig; +use Rector\Symfony\DependencyInjection\Rector\Class_\GetBySymfonyStringToConstructorInjectionRector; return RectorConfig::configure() - ->withRules([ - GetBySymfonyStringToConstructorInjectionRector::class, - ]); + ->withRules([GetBySymfonyStringToConstructorInjectionRector::class]);