From 923c30938df274a3b57a77fed9683dca85ad5a8a Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:31:20 -0300 Subject: [PATCH] Fix optional parameter declared before required parameter implicitly (#20139) --- tests/framework/console/FakePhp71Controller.php | 11 ++++++++--- tests/framework/web/FakePhp71Controller.php | 11 ++++++++--- tests/framework/web/FakePhp7Controller.php | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tests/framework/console/FakePhp71Controller.php b/tests/framework/console/FakePhp71Controller.php index cc23ae6029..44ba0fbd31 100644 --- a/tests/framework/console/FakePhp71Controller.php +++ b/tests/framework/console/FakePhp71Controller.php @@ -14,9 +14,14 @@ use yii\console\Request; class FakePhp71Controller extends Controller { - public function actionInjection($before, Request $request, $between, DummyService $dummyService, ?Post $post = null, $after) - { - + public function actionInjection( + $before, + Request $request, + $between, + DummyService $dummyService, + ?Post $post, + $after + ) { } public function actionNullableInjection(?Request $request, ?Post $post) diff --git a/tests/framework/web/FakePhp71Controller.php b/tests/framework/web/FakePhp71Controller.php index f84214c6e8..c48243e2fe 100644 --- a/tests/framework/web/FakePhp71Controller.php +++ b/tests/framework/web/FakePhp71Controller.php @@ -21,9 +21,14 @@ class FakePhp71Controller extends Controller { public $enableCsrfValidation = false; - public function actionInjection($before, Request $request, $between, VendorImage $vendorImage, ?Post $post = null, $after) - { - + public function actionInjection( + $before, + Request $request, + $between, + VendorImage $vendorImage, + ?Post $post, + $after + ) { } public function actionNullableInjection(?Request $request, ?Post $post) diff --git a/tests/framework/web/FakePhp7Controller.php b/tests/framework/web/FakePhp7Controller.php index 381ba3e0ee..74008f49fa 100644 --- a/tests/framework/web/FakePhp7Controller.php +++ b/tests/framework/web/FakePhp7Controller.php @@ -17,7 +17,7 @@ class FakePhp7Controller extends Controller { public $enableCsrfValidation = false; - public function actionAksi1(int $foo, ?float $bar = null, bool $true, bool $false) + public function actionAksi1(int $foo, ?float $bar, bool $true, bool $false) { }