Skip to content

Commit

Permalink
Improve package configuration params' names (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Dec 2, 2023
1 parent 8b42e8e commit 55e218c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
return [
static function (ContainerInterface $container) use ($params) {
ThemeContainer::initialize(
$params['yiisoft/form']['configs'],
$params['yiisoft/form']['defaultConfig'],
$params['yiisoft/form']['themes'],
$params['yiisoft/form']['defaultTheme'],
$params['yiisoft/form']['validationRulesEnricher'],
);
},
Expand Down
4 changes: 2 additions & 2 deletions config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

return [
'yiisoft/form' => [
'configs' => [
'themes' => [
'default' => [],
],
'defaultConfig' => 'default',
'defaultTheme' => 'default',
'validationRulesEnricher' => null,
],
];
4 changes: 2 additions & 2 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testBase(): void
public function testCustomParams(): void
{
$params = $this->getParams();
$params['yiisoft/form']['configs'] = [
$params['yiisoft/form']['themes'] = [
'simple' => [
'fieldConfigs' => [
Hidden::class => [
Expand All @@ -45,7 +45,7 @@ public function testCustomParams(): void
],
],
];
$params['yiisoft/form']['defaultConfig'] = 'simple';
$params['yiisoft/form']['defaultTheme'] = 'simple';

$bootstrapList = $this->getBootstrapList($params);
$bootstrap = array_shift($bootstrapList);
Expand Down

0 comments on commit 55e218c

Please sign in to comment.