Skip to content

Commit

Permalink
Adapt to new runners (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Feb 19, 2023
1 parent 1e1247f commit 24ebcc7
Show file tree
Hide file tree
Showing 42 changed files with 214 additions and 235 deletions.
101 changes: 15 additions & 86 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,39 @@
"vlucas/phpdotenv": "^5.3",
"yiisoft/access": "^1.0",
"yiisoft/auth": "^3.0",
"yiisoft/cache": "^2.0",
"yiisoft/cache-file": "^2.0",
"yiisoft/cache": "^3.0",
"yiisoft/cache-file": "^3.0",
"yiisoft/config": "^1.0",
"yiisoft/data": "^1.0",
"yiisoft/data-response": "^1.0",
"yiisoft/data-response": "^2.0",
"yiisoft/definitions": "^3.0",
"yiisoft/di": "^1.2",
"yiisoft/error-handler": "^2.0",
"yiisoft/error-handler": "^3.0",
"yiisoft/factory": "^1.1",
"yiisoft/files": "^2.0",
"yiisoft/http": "^1.2",
"yiisoft/injector": "^1.1",
"yiisoft/log": "^2.0",
"yiisoft/log-target-file": "^2.0",
"yiisoft/log-target-file": "^3.0",
"yiisoft/request-body-parser": "^1.1",
"yiisoft/request-model": "^1.0@dev",
"yiisoft/router": "^2.0",
"yiisoft/router-fastroute": "^2.0",
"yiisoft/router": "^3.0",
"yiisoft/router-fastroute": "^3.0",
"yiisoft/security": "^1.0",
"yiisoft/translator": "^2.0",
"yiisoft/translator": "^3.0",
"yiisoft/translator-message-php": "^1.1",
"yiisoft/user": "^1.0",
"yiisoft/user": "^2.0",
"yiisoft/validator": "^3.0@dev",
"yiisoft/yii-console": "^1.3",
"yiisoft/yii-console": "^2.0",
"yiisoft/yii-cycle": "dev-master",
"yiisoft/yii-debug": "^3.0@dev",
"yiisoft/yii-debug-api": "^3.0@dev",
"yiisoft/yii-event": "^1.0",
"yiisoft/yii-event": "^2.0",
"yiisoft/yii-http": "^1.0",
"yiisoft/yii-middleware": "dev-master",
"yiisoft/yii-runner-console": "^1.1",
"yiisoft/yii-runner-http": "^1.1",
"yiisoft/yii-swagger": "^1.0"
"yiisoft/yii-runner-console": "^2.0",
"yiisoft/yii-runner-http": "^2.0",
"yiisoft/yii-swagger": "^2.0"
},
"require-dev": {
"codeception/c3": "^2.6",
Expand Down Expand Up @@ -116,78 +116,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": {
"common": "common/*.php",
"params": [
"params.php",
"?params-local.php"
],
"web": [
"$common",
"web/*.php"
],
"console": [
"$common",
"console/*.php"
],
"events": "events.php",
"events-web": [
"$events",
"events-web.php"
],
"events-console": [
"$events",
"events-console.php"
],
"providers": "providers.php",
"providers-web": [
"$providers",
"providers-web.php"
],
"providers-console": [
"$providers",
"providers-console.php"
],
"delegates": "delegates.php",
"delegates-web": [
"$delegates",
"delegates-web.php"
],
"delegates-console": [
"$delegates",
"delegates-console.php"
],
"routes": "routes.php",
"bootstrap": "bootstrap.php",
"bootstrap-web": [
"$bootstrap",
"bootstrap-web.php"
],
"bootstrap-console": [
"$bootstrap",
"bootstrap-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
@@ -1 +1,2 @@
*-local.php
.merge-plan.php
5 changes: 0 additions & 5 deletions config/bootstrap-console.php

This file was deleted.

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

This file was deleted.

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

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 2 additions & 36 deletions config/params.php → config/common/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,21 @@

declare(strict_types=1);

use App\Command\Hello;
use Cycle\Database\Config\SQLite\FileConnectionConfig;
use Cycle\Database\Config\SQLiteDriverConfig;
use Yiisoft\Assets\AssetManager;
use Yiisoft\Definitions\Reference;
use Yiisoft\ErrorHandler\Middleware\ErrorCatcher;
use Yiisoft\Router\Middleware\Router;
use Yiisoft\Yii\Cycle\Command\Migration;
use Yiisoft\Yii\Cycle\Command\Schema;
use Yiisoft\Yii\Cycle\Schema\Conveyor\AttributedSchemaConveyor;
use Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider;
use Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider;
use Yiisoft\Yii\Cycle\Schema\SchemaProviderInterface;
use Yiisoft\Yii\Middleware\SubFolder;

return [
'locale' => [
'locales' => ['en' => 'en-US', 'ru' => 'ru-RU'],
'ignoredRequests' => [
'/debug**',
],
],
'supportEmail' => 'support@example.com',
'middlewares' => [
ErrorCatcher::class,
SubFolder::class,
\Yiisoft\Yii\Middleware\Locale::class,
Router::class,
],

'yiisoft/aliases' => [
'aliases' => [
'@root' => dirname(__DIR__),
'@root' => dirname(__DIR__, 2),
'@assets' => '@public/assets',
'@assetsUrl' => '@baseUrl/assets',
'@baseUrl' => '/',
Expand Down Expand Up @@ -67,22 +49,6 @@
],
],

// Console commands
'yiisoft/yii-console' => [
'commands' => [
'hello' => Hello::class,
'cycle/schema' => Schema\SchemaCommand::class,
'cycle/schema/php' => Schema\SchemaPhpCommand::class,
'cycle/schema/clear' => Schema\SchemaClearCommand::class,
'cycle/schema/rebuild' => Schema\SchemaRebuildCommand::class,
'migrate/create' => Migration\CreateCommand::class,
'migrate/generate' => Migration\GenerateCommand::class,
'migrate/up' => Migration\UpCommand::class,
'migrate/down' => Migration\DownCommand::class,
'migrate/list' => Migration\ListCommand::class,
],
],

'yiisoft/yii-cycle' => [
// DBAL config
'dbal' => [
Expand All @@ -97,7 +63,7 @@
],
'connections' => [
'sqlite' => new SQLiteDriverConfig(
new FileConnectionConfig(dirname(__DIR__) . '/data/db/database.db')
new FileConnectionConfig(dirname(__DIR__, 2) . '/data/db/database.db')
),
],
],
Expand Down
File renamed without changes.
Empty file removed config/console/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions config/console/commands.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

use App\Command\Hello;
use Yiisoft\Yii\Cycle\Command\Migration;
use Yiisoft\Yii\Cycle\Command\Schema;

return [
'hello' => Hello::class,
'cycle/schema' => Schema\SchemaCommand::class,
'cycle/schema/php' => Schema\SchemaPhpCommand::class,
'cycle/schema/clear' => Schema\SchemaClearCommand::class,
'cycle/schema/rebuild' => Schema\SchemaRebuildCommand::class,
'migrate/create' => Migration\CreateCommand::class,
'migrate/generate' => Migration\GenerateCommand::class,
'migrate/up' => Migration\UpCommand::class,
'migrate/down' => Migration\DownCommand::class,
'migrate/list' => Migration\ListCommand::class,
];
9 changes: 9 additions & 0 deletions config/console/params.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

return [
'yiisoft/yii-console' => [
'commands' => require __DIR__ . '/commands.php',
],
];
5 changes: 0 additions & 5 deletions config/delegates-console.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/delegates-web.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.

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.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'dbal' => [
'connections' => [
'sqlite' => new SQLiteDriverConfig(
new FileConnectionConfig(dirname(__DIR__, 2) . '/tests/Support/Data/database.db')
new FileConnectionConfig(dirname(__DIR__, 3) . '/tests/Support/Data/database.db')
),
],
],
Expand Down
5 changes: 0 additions & 5 deletions config/events-console.php

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions config/providers-web.php

This file was deleted.

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

This file was deleted.

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

declare(strict_types=1);

use Yiisoft\ErrorHandler\Middleware\ErrorCatcher;
use Yiisoft\Router\Middleware\Router;
use Yiisoft\Yii\Middleware\Locale;
use Yiisoft\Yii\Middleware\SubFolder;

return [
'middlewares' => [
ErrorCatcher::class,
SubFolder::class,
Locale::class,
Router::class,
],

'locale' => [
'locales' => ['en' => 'en-US', 'ru' => 'ru-RU'],
'ignoredRequests' => [
'/debug**',
],
],
];
Loading

0 comments on commit 24ebcc7

Please sign in to comment.