Skip to content

Commit a6a7f01

Browse files
authored
Fix #20514: Add @property annotations for yii\console\Controller
1 parent aa04f38 commit a6a7f01

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

build/controllers/PhpDocController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Yii;
1111
use yii\base\Model;
1212
use yii\base\Module;
13-
use yii\console\Controller;
13+
use yii\console\Controller as ConsoleController;
1414
use yii\db\QueryBuilder;
1515
use yii\helpers\Console;
1616
use yii\helpers\FileHelper;
@@ -27,7 +27,7 @@
2727
* @author Alexander Makarov <[email protected]>
2828
* @since 2.0
2929
*/
30-
class PhpDocController extends Controller
30+
class PhpDocController extends ConsoleController
3131
{
3232
/**
3333
* Manually added PHPDoc properties that do not need to be removed or changed.
@@ -40,6 +40,10 @@ class PhpDocController extends Controller
4040
'response',
4141
'view',
4242
],
43+
ConsoleController::class => [
44+
'request',
45+
'response',
46+
],
4347
Model::class => [
4448
'errors',
4549
],

framework/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Yii Framework 2 Change Log
2424
- Bug #20485: Fix error `Cannot unset string offsets` in `yii\di\Instance:ensure(['__class' => ...], 'some\class\name')` (max-s-lab)
2525
- Enh #20505: `ArrayDataProvider` key handling with flexible path support (fetus-hina)
2626
- Bug #20508: Fix PHPDoc, add PHPStan/Psalm annotations for `yii\web\CookieCollection::getIterator`. Add missing `@property` annotation in `yii\base\Model` (max-s-lab)
27+
- Enh #20514: Add `@property` annotations for `yii\console\Controller` (max-s-lab)
28+
2729

2830
2.0.53 June 27, 2025
2931
--------------------

framework/console/Controller.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* where `<route>` is a route to a controller action and the params will be populated as properties of a command.
2929
* See [[options()]] for details.
3030
*
31+
* @property Request $request The request object.
32+
* @property Response $response The response object.
3133
* @property-read string $help The help information for this controller.
3234
* @property-read string $helpSummary The one-line short summary describing this controller.
3335
* @property-read array $passedOptionValues The properties corresponding to the passed options.

0 commit comments

Comments
 (0)