Skip to content

Commit ce04ffb

Browse files
committed
Update more dependencies and cycle config
1 parent 92ed70b commit ce04ffb

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"cycle/orm": "^2.0",
2626
"httpsoft/http-message": "^1.0.5",
2727
"myclabs/php-enum": "^1.7",
28-
"psr/container": "^1.0|^2.0",
28+
"psr/container": "^2.0",
2929
"psr/http-factory": "^1.0",
3030
"psr/http-message": "^1.0",
3131
"psr/http-server-handler": "^1.0",
@@ -63,18 +63,18 @@
6363
"yiisoft/yii-http": "^1.0",
6464
"yiisoft/yii-middleware": "dev-master",
6565
"yiisoft/yii-runner-console": "^1.0",
66-
"yiisoft/yii-runner-http": "^1.0",
66+
"yiisoft/yii-runner-http": "^1.1",
6767
"yiisoft/yii-swagger": "^1.0"
6868
},
6969
"require-dev": {
7070
"codeception/c3": "^2.6",
71-
"codeception/codeception": "^4.1",
72-
"codeception/lib-innerbrowser": "^2.0",
73-
"codeception/module-asserts": "^2.0",
71+
"codeception/codeception": "^5.0",
72+
"codeception/lib-innerbrowser": "^3.0",
73+
"codeception/module-asserts": "^3.0",
7474
"codeception/module-cli": "^2.0",
7575
"codeception/module-db": "^2.0",
76-
"codeception/module-phpbrowser": "^2.0",
77-
"codeception/module-rest": "^2.0",
76+
"codeception/module-phpbrowser": "^3.0",
77+
"codeception/module-rest": "^3.0",
7878
"phpunit/phpunit": "^9.5",
7979
"roave/infection-static-analysis-plugin": "^1.16",
8080
"spatie/phpunit-watcher": "^1.23",

config/params.php

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
declare(strict_types=1);
44

5-
use Cycle\Schema\Generator;
6-
use Spiral\Database\Driver\SQLite\SQLiteDriver;
75
use Yiisoft\Assets\AssetManager;
86
use Yiisoft\Definitions\Reference;
97
use Yiisoft\ErrorHandler\Middleware\ErrorCatcher;
108
use Yiisoft\Router\Middleware\Router;
119
use Yiisoft\Yii\Cycle\Command\Schema;
1210
use Yiisoft\Yii\Cycle\Command\Migration;
13-
use Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider;
11+
use Yiisoft\Yii\Cycle\Schema\Conveyor\AttributedSchemaConveyor;
1412
use Yiisoft\Yii\Cycle\Schema\SchemaProviderInterface;
1513
use Yiisoft\Yii\Middleware\SubFolder;
1614

@@ -69,6 +67,7 @@
6967
// DBAL config
7068
'dbal' => [
7169
// SQL query logger. Definition of Psr\Log\LoggerInterface
70+
// For example, \Yiisoft\Yii\Cycle\Logger\StdoutQueryLogger::class
7271
'query-logger' => null,
7372
// Default database
7473
'default' => 'default',
@@ -77,14 +76,13 @@
7776
'default' => ['connection' => 'sqlite'],
7877
],
7978
'connections' => [
80-
'sqlite' => [
81-
'driver' => SQLiteDriver::class,
82-
'connection' => $_ENV['YII_ENV'] === 'production'
83-
? 'sqlite:@data/db/database.db'
84-
: 'sqlite:@tests/_data/database.db',
85-
'username' => '',
86-
'password' => '',
87-
],
79+
'sqlite' => new \Cycle\Database\Config\SQLiteDriverConfig(
80+
connection: new \Cycle\Database\Config\SQLite\FileConnectionConfig(
81+
database: $_ENV['YII_ENV'] === 'production'
82+
? '@data/db/database.db'
83+
: 'sqlite:@tests/_data/database.db'
84+
)
85+
),
8886
],
8987
],
9088

@@ -115,11 +113,18 @@
115113
* ]
116114
*/
117115
'schema-providers' => [
118-
// Uncomment next line to enable schema cache
119-
// SimpleCacheSchemaProvider::class => ['key' => 'cycle-orm-cache-key'],
120-
FromConveyorSchemaProvider::class => [
116+
// Uncomment next line to enable a Schema caching in the common cache
117+
// \Yiisoft\Yii\Cycle\Schema\Provider\SimpleCacheSchemaProvider::class => ['key' => 'cycle-orm-cache-key'],
118+
119+
// Store generated Schema in the file
120+
\Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::class => [
121+
'mode' => \Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::MODE_WRITE_ONLY,
122+
'file' => 'runtime/schema.php',
123+
],
124+
125+
\Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider::class => [
121126
'generators' => [
122-
Generator\SyncTables::class,
127+
Cycle\Schema\Generator\SyncTables::class, // sync table changes to database
123128
],
124129
],
125130
],
@@ -129,10 +134,12 @@
129134
* Annotated entity directories list.
130135
* {@see \Yiisoft\Aliases\Aliases} are also supported.
131136
*/
132-
'annotated-entity-paths' => [
137+
'entity-paths' => [
133138
'@src',
134139
],
140+
'conveyor' => AttributedSchemaConveyor::class,
135141
],
142+
136143
'yiisoft/yii-swagger' => [
137144
'annotation-paths' => [
138145
'@src',

0 commit comments

Comments
 (0)