From c547226d4946518929d137c0b66ba35bf9a8f36e Mon Sep 17 00:00:00 2001 From: Dawid Parafinski Date: Wed, 9 Sep 2026 13:52:35 +0200 Subject: [PATCH] IBX-12046: Removed Symfony 8 deprecated code usage Adds explicit nullable (?) type-hints to implicit nullable parameters (Type $param = null) in ChangeArgumentTypeRector test fixtures, which is deprecated as of PHP 8.4 and removed in PHP 9.0. --- .../ChangeArgumentTypeRector/Fixture/abstract_class.php.inc | 4 ++-- .../Rule/ChangeArgumentTypeRector/Fixture/basic_class.php.inc | 4 ++-- .../ChangeArgumentTypeRector/Fixture/basic_interface.php.inc | 4 ++-- .../class_that_extends_abstract_with_interface.php.inc | 4 ++-- .../Fixture/class_that_should_not_be_changed.php.inc | 2 +- .../class_with_param_that_should_not_be_changed.php.inc | 2 +- .../ChangeArgumentTypeRector/Fixture/extending_class.php.inc | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/abstract_class.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/abstract_class.php.inc index ba16717..bbb45f1 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/abstract_class.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/abstract_class.php.inc @@ -9,7 +9,7 @@ abstract class Bar implements Type mixed $value, mixed $currentUser, ValueObject $object, - array $targets = null + ?array $targets = null ): ?bool { return null; } @@ -28,7 +28,7 @@ abstract class Bar implements Type mixed $value, mixed $currentUser, object $object, - array $targets = null + ?array $targets = null ): ?bool { return null; } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_class.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_class.php.inc index 37ea546..1a07de8 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_class.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_class.php.inc @@ -9,7 +9,7 @@ class Foo implements Type mixed $value, mixed $currentUser, ValueObject $differentName, - array $targets = null + ?array $targets = null ): ?bool { return null; } @@ -28,7 +28,7 @@ class Foo implements Type mixed $value, mixed $currentUser, object $differentName, - array $targets = null + ?array $targets = null ): ?bool { return null; } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_interface.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_interface.php.inc index 041e34e..7de7c51 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_interface.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/basic_interface.php.inc @@ -9,7 +9,7 @@ interface SubType extends Type mixed $value, mixed $currentUser, ValueObject $object, - array $targets = null, + ?array $targets = null, bool $foo = false ): ?bool; } @@ -27,7 +27,7 @@ interface SubType extends Type mixed $value, mixed $currentUser, object $object, - array $targets = null, + ?array $targets = null, bool $foo = false ): ?bool; } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_extends_abstract_with_interface.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_extends_abstract_with_interface.php.inc index 9c37fc2..faf8710 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_extends_abstract_with_interface.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_extends_abstract_with_interface.php.inc @@ -9,7 +9,7 @@ class Foo extends AbstractType mixed $value, mixed $currentUser, ValueObject $differentName, - array $targets = null + ?array $targets = null ): ?bool { return null; } @@ -28,7 +28,7 @@ class Foo extends AbstractType mixed $value, mixed $currentUser, object $differentName, - array $targets = null + ?array $targets = null ): ?bool { return null; } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_should_not_be_changed.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_should_not_be_changed.php.inc index 3ac21b9..899a9bd 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_should_not_be_changed.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_that_should_not_be_changed.php.inc @@ -7,7 +7,7 @@ class ShouldNotBeChanged { mixed $value, mixed $currentUser, ValueObject $object, - array $targets = null + ?array $targets = null ): ?bool {} } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_with_param_that_should_not_be_changed.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_with_param_that_should_not_be_changed.php.inc index 6f9f981..be401b1 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_with_param_that_should_not_be_changed.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/class_with_param_that_should_not_be_changed.php.inc @@ -8,7 +8,7 @@ class WithParamThatShouldNotBeChanged implements Type { mixed $value, mixed $currentUser, object $object, - array $targets = null + ?array $targets = null ): ?bool {} } diff --git a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/extending_class.php.inc b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/extending_class.php.inc index bf475a0..22e27ca 100644 --- a/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/extending_class.php.inc +++ b/tests/lib/Rule/ChangeArgumentTypeRector/Fixture/extending_class.php.inc @@ -9,7 +9,7 @@ final class FooBar extends BasicType mixed $value, mixed $currentUser, ValueObject $object, - array $targets = null + ?array $targets = null ): ?bool { return null; } @@ -28,7 +28,7 @@ final class FooBar extends BasicType mixed $value, mixed $currentUser, object $object, - array $targets = null + ?array $targets = null ): ?bool { return null; }