Skip to content

Commit

Permalink
Add UrlGenerator host and scheme props to config params
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-gor committed Nov 2, 2024
1 parent 3d6f317 commit cb825ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 3.1.1 under development

- no changes in this release.
- Enh #154: Add UrlGenerator host and scheme properties to package config params (@ev-gor)

## 3.1.0 March 19, 2024

Expand Down
4 changes: 4 additions & 0 deletions config/di.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
return [
UrlGeneratorInterface::class => [
'class' => UrlGenerator::class,
'__construct()' => [
'scheme' => $params['yiisoft/router-fastroute']['scheme'],
'host' => $params['yiisoft/router-fastroute']['host'],
],
'setEncodeRaw()' => [$params['yiisoft/router-fastroute']['encodeRaw']],
'reset' => function () {
$this->defaultArguments = [];
Expand Down
2 changes: 2 additions & 0 deletions config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
* Default `true` is RFC3986 compliant
*/
'encodeRaw' => true,
'scheme' => null,
'host' => null,
],
];

0 comments on commit cb825ea

Please sign in to comment.