From 9f7cfb97e97c5c3cb41c0a23340dcce55404a6d4 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 25 Dec 2023 17:40:55 +0300 Subject: [PATCH] Add ability to set custom config modifiers --- CHANGELOG.md | 4 ++-- composer.json | 2 +- src/HttpApplicationRunner.php | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cebcc65..8229bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Yii Runner HTTP Change Log -## 2.1.1 under development +## 2.2.0 under development -- no changes in this release. +- New #49: Add ability to set custom config modifiers (@vjik) ## 2.1.0 July 10, 2023 diff --git a/composer.json b/composer.json index 647275e..3afed5e 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "yiisoft/log": "^2.0", "yiisoft/log-target-file": "^3.0", "yiisoft/yii-http": "^1.0", - "yiisoft/yii-runner": "^2.0" + "yiisoft/yii-runner": "^2.1" }, "require-dev": { "httpsoft/http-message": "^1.0", diff --git a/src/HttpApplicationRunner.php b/src/HttpApplicationRunner.php index 2725e06..19d0fb4 100644 --- a/src/HttpApplicationRunner.php +++ b/src/HttpApplicationRunner.php @@ -50,9 +50,11 @@ final class HttpApplicationRunner extends ApplicationRunner * This is needed for recursive merging of parameters. * @param array $nestedEventsGroups Configuration group names that are included into events' configuration group. * This is needed for reverse and recursive merge of events' configurations. + * @param object[] $configModifiers Modifiers for {@see Config}. * * @psalm-param list $nestedParamsGroups * @psalm-param list $nestedEventsGroups + * @psalm-param list $configModifiers */ public function __construct( string $rootPath, @@ -68,6 +70,7 @@ public function __construct( string $paramsGroup = 'params-web', array $nestedParamsGroups = ['params'], array $nestedEventsGroups = ['events'], + array $configModifiers = [], ) { parent::__construct( $rootPath, @@ -83,6 +86,7 @@ public function __construct( $paramsGroup, $nestedParamsGroups, $nestedEventsGroups, + $configModifiers, ); }