Skip to content

Commit

Permalink
New structure of configs (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 19, 2023
1 parent 8292a29 commit d28f8ce
Show file tree
Hide file tree
Showing 21 changed files with 81 additions and 268 deletions.
59 changes: 5 additions & 54 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"require": {
"php": "^8.0",
"vlucas/phpdotenv": "^5.3",
"yiisoft/aliases": "^2.0",
"yiisoft/aliases": "^3.0",
"yiisoft/log": "^2.0",
"yiisoft/log-target-file": "^2.0",
"yiisoft/yii-console": "^1.3",
"yiisoft/yii-runner-console": "^1.1"
"yiisoft/log-target-file": "^3.0",
"yiisoft/yii-console": "^2.0",
"yiisoft/yii-runner-console": "^2.0"
},
"require-dev": {
"codeception/codeception": "^5.0",
Expand All @@ -61,56 +61,7 @@
"branch-alias": {
"dev-master": "1.0.x-dev"
},
"config-plugin-options": {
"source-directory": "config"
},
"config-plugin-environments": {
"dev": {
"params": [
"test/params.php"
]
},
"prod": {
"params": [
"test/params.php"
]
},
"test": {
"params": [
"test/params.php"
]
}
},
"config-plugin": {
"params": "params.php",
"bootstrap": "bootstrap.php",
"bootstrap-console": [
"$bootstrap",
"bootstrap-console.php"
],
"common": [
"common/*.php"
],
"console": [
"$common",
"console/*.php"
],
"events": "events.php",
"events-console": [
"$events",
"events-console.php"
],
"providers": "providers.php",
"providers-console": [
"$providers",
"providers-console.php"
],
"delegates": "delegates.php",
"delegates-console": [
"$delegates",
"delegates-console.php"
]
}
"config-plugin-file": "configuration.php"
},
"config": {
"sort-packages": true,
Expand Down
1 change: 1 addition & 0 deletions config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.merge-plan.php
144 changes: 0 additions & 144 deletions config/.merge-plan.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/bootstrap-console.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/bootstrap.php

This file was deleted.

9 changes: 9 additions & 0 deletions config/commands.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

use App\Command\HelloCommand;

return [
HelloCommand::$defaultName => HelloCommand::class,
];
5 changes: 0 additions & 5 deletions config/delegates-console.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/delegates.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/dev/params.php

This file was deleted.

File renamed without changes.
9 changes: 9 additions & 0 deletions config/environments/dev/params.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

return [
'yiisoft/yii-debug' => [
'enabled' => true,
],
];
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions config/events-console.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/events.php

This file was deleted.

6 changes: 1 addition & 5 deletions config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

use App\Command\HelloCommand;

return [
'yiisoft/aliases' => [
'aliases' => [
Expand All @@ -13,8 +11,6 @@
],

'yiisoft/yii-console' => [
'commands' => [
HelloCommand::$defaultName => HelloCommand::class,
],
'commands' => require __DIR__ . '/commands.php',
],
];
5 changes: 0 additions & 5 deletions config/providers-console.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/providers.php

This file was deleted.

40 changes: 40 additions & 0 deletions configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

declare(strict_types=1);

return [
'config-plugin' => [
'params' => 'params.php',
'params-console' => '$params',
'di' => 'di/*.php',
'di-console' => '$di',
'di-delegates' => [],
'di-delegates-console' => '$di-delegates',
'di-providers' => [],
'di-providers-console' => '$di-providers',
'events' => [],
'events-console' => '$events',
'bootstrap' => [],
'bootstrap-console' => '$bootstrap',
],
'config-plugin-environments' => [
'dev' => [
'params' => [
'environments/dev/params.php',
],
],
'prod' => [
'params' => [
'environments/prod/params.php',
],
],
'test' => [
'params' => [
'environments/test/params.php',
],
],
],
'config-plugin-options' => [
'source-directory' => 'config',
],
];

0 comments on commit d28f8ce

Please sign in to comment.