From 9d56966bc1a1378eceb78da4e3f0a20065dcf1aa Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Mon, 1 Sep 2025 05:01:50 -0400 Subject: [PATCH] fix(app): Update PHPStan annotations and add container configuration file. --- CHANGELOG.md | 1 + config/console/app.php | 4 ++-- config/console/container.php | 5 +++++ config/web/app.php | 9 ++++++--- config/web/container.php | 5 +++++ 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 config/console/container.php create mode 100644 config/web/container.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 64f02a2..35653c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Bug #141: Move badges for latest stable version and total downloads in `README.md` to `Installation` section (@terabytesoftw) - Bug #143: Add `Available stacks` section with `RoadRunner` badge to `README.md` (@terabytesoftw) - Bug #146: Remove `yiisoft/yii2-symfonymailer` dependency from `composer.json` (@terabytesoftw) +- Bug #149: Update PHPStan annotations and add container configuration file (@terabytesoftw) ## 0.1.0 August 31, 2025 diff --git a/config/console/app.php b/config/console/app.php index 33ffc39..f25fe9b 100644 --- a/config/console/app.php +++ b/config/console/app.php @@ -4,9 +4,9 @@ use app\usecase\hello\HelloController; -/** @var string[] $components */ +/** @phpstan-var array $components */ $components = require dirname(__DIR__) . '/common/components.php'; -/** @var string[] $params */ +/** @phpstan-var array $params */ $params = require dirname(__DIR__) . '/params-console.php'; return [ diff --git a/config/console/container.php b/config/console/container.php new file mode 100644 index 0000000..0dae23d --- /dev/null +++ b/config/console/container.php @@ -0,0 +1,5 @@ + $components */ $components = require __DIR__ . '/components.php'; -/** @phpstan-var string[] $modules */ +/** @phpstan-var array $container */ +$container = require __DIR__ . '/container.php'; +/** @phpstan-var array $modules */ $modules = require __DIR__ . '/modules.php'; -/** @phpstan-var string[] $params */ +/** @phpstan-var array $params */ $params = require dirname(__DIR__) . '/params-web.php'; $rootDir = dirname(__DIR__, 2); @@ -25,6 +27,7 @@ 'basePath' => $rootDir, 'bootstrap' => ['log'], 'components' => $components, + 'container' => $container, 'controllerMap' => [ 'site' => ['class' => SiteController::class], ], diff --git a/config/web/container.php b/config/web/container.php new file mode 100644 index 0000000..0dae23d --- /dev/null +++ b/config/web/container.php @@ -0,0 +1,5 @@ +