Issues (867)

blog/config/common/params.php (13 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
use App\ViewInjection\CommonViewInjection;
6
use App\ViewInjection\LayoutViewInjection;
7
use App\ViewInjection\LinkTagsViewInjection;
8
use App\ViewInjection\MetaTagsViewInjection;
9
use Cycle\Database\Config\SQLite\FileConnectionConfig;
0 ignored issues
show
The type Cycle\Database\Config\SQLite\FileConnectionConfig was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Cycle\Database\Config\SQLiteDriverConfig;
0 ignored issues
show
The type Cycle\Database\Config\SQLiteDriverConfig was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Cycle\Schema\Provider\PhpFileSchemaProvider;
0 ignored issues
show
The type Cycle\Schema\Provider\PhpFileSchemaProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Yiisoft\Assets\AssetManager;
0 ignored issues
show
The type Yiisoft\Assets\AssetManager was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use Yiisoft\Definitions\Reference;
0 ignored issues
show
The type Yiisoft\Definitions\Reference was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Yiisoft\Form\Field\SubmitButton;
0 ignored issues
show
The type Yiisoft\Form\Field\SubmitButton was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
use Yiisoft\Router\CurrentRoute;
0 ignored issues
show
The type Yiisoft\Router\CurrentRoute was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
use Yiisoft\Router\UrlGeneratorInterface;
0 ignored issues
show
The type Yiisoft\Router\UrlGeneratorInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Yiisoft\Translator\TranslatorInterface;
0 ignored issues
show
The type Yiisoft\Translator\TranslatorInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
use Yiisoft\Yii\Cycle\Schema\Conveyor\AttributedSchemaConveyor;
0 ignored issues
show
The type Yiisoft\Yii\Cycle\Schema...ttributedSchemaConveyor was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
use Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider;
0 ignored issues
show
The type Yiisoft\Yii\Cycle\Schema...mConveyorSchemaProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
use Yiisoft\Yii\View\Renderer\CsrfViewInjection;
0 ignored issues
show
The type Yiisoft\Yii\View\Renderer\CsrfViewInjection was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
22
return [
23
    'mailer' => [
24
        'adminEmail' => '[email protected]',
25
        'senderEmail' => '[email protected]',
26
    ],
27
28
    'yiisoft/aliases' => [
29
        'aliases' => [
30
            '@root' => dirname(__DIR__, 2),
31
            '@assets' => '@root/public/assets',
32
            '@assetsUrl' => '@baseUrl/assets',
33
            '@baseUrl' => '',
34
            '@messages' => '@resources/messages',
35
            '@npm' => '@root/node_modules',
36
            '@public' => '@root/public',
37
            '@resources' => '@root/resources',
38
            '@runtime' => '@root/runtime',
39
            '@src' => '@root/src',
40
            '@vendor' => '@root/vendor',
41
            '@layout' => '@views/layout',
42
            '@views' => '@resources/views',
43
        ],
44
    ],
45
46
    'yiisoft/form' => [
47
        'themes' => [
48
            'default' => [
49
                'containerClass' => 'form-floating mb-3',
50
                'inputClass' => 'form-control',
51
                'invalidClass' => 'is-invalid',
52
                'validClass' => 'is-valid',
53
                'template' => '{input}{label}{hint}{error}',
54
                'labelClass' => 'floatingInput',
55
                'errorClass' => 'fw-bold fst-italic',
56
                'hintClass' => 'form-text',
57
                'fieldConfigs' => [
58
                    SubmitButton::class => [
59
                        'buttonClass()' => ['btn btn-primary btn-lg mt-3'],
60
                        'containerClass()' => ['d-grid gap-2 form-floating'],
61
                    ],
62
                ],
63
            ],
64
        ],
65
    ],
66
67
    'yiisoft/rbac-rules-container' => [
68
        'rules' => require __DIR__ . '/rbac-rules.php',
69
    ],
70
71
    'yiisoft/router-fastroute' => [
72
        'enableCache' => false,
73
    ],
74
75
    'yiisoft/translator' => [
76
        'locale' => 'en',
77
        'fallbackLocale' => 'en',
78
        'defaultCategory' => 'app',
79
    ],
80
81
    'yiisoft/view' => [
82
        'basePath' => '@views',
83
        'parameters' => [
84
            'assetManager' => Reference::to(AssetManager::class),
85
            'urlGenerator' => Reference::to(UrlGeneratorInterface::class),
86
            'currentRoute' => Reference::to(CurrentRoute::class),
87
            'translator' => Reference::to(TranslatorInterface::class),
88
        ],
89
    ],
90
91
    'yiisoft/cookies' => [
92
        'secretKey' => '53136271c432a1af377c3806c3112ddf',
93
    ],
94
95
    'yiisoft/yii-view-renderer' => [
96
        'viewPath' => '@views',
97
        'layout' => '@views/layout/main',
98
        'injections' => [
99
            Reference::to(CommonViewInjection::class),
100
            Reference::to(CsrfViewInjection::class),
101
            Reference::to(LayoutViewInjection::class),
102
            Reference::to(LinkTagsViewInjection::class),
103
            Reference::to(MetaTagsViewInjection::class),
104
        ],
105
    ],
106
107
    'yiisoft/yii-cycle' => [
108
        // DBAL config
109
        'dbal' => [
110
            // SQL query logger. Definition of Psr\Log\LoggerInterface
111
            // For example, \Yiisoft\Yii\Cycle\Logger\StdoutQueryLogger::class
112
            'query-logger' => null,
113
            // Default database
114
            'default' => 'default',
115
            'aliases' => [],
116
            'databases' => [
117
                'default' => ['connection' => 'sqlite'],
118
            ],
119
            'connections' => [
120
                'sqlite' => new SQLiteDriverConfig(
121
                    connection: new FileConnectionConfig(
122
                        database: 'runtime/database.db'
123
                    )
124
                ),
125
            ],
126
        ],
127
128
        // Cycle migration config
129
        'migrations' => [
130
            'directory' => '@root/migrations',
131
            'namespace' => 'App\\Migration',
132
            'table' => 'migration',
133
            'safe' => false,
134
        ],
135
136
        /**
137
         * SchemaProvider list for {@see \Yiisoft\Yii\Cycle\Schema\Provider\Support\SchemaProviderPipeline}
138
         * Array of classname and {@see SchemaProviderInterface} object.
139
         * You can configure providers if you pass classname as key and parameters as array:
140
         * [
141
         *     SimpleCacheSchemaProvider::class => [
142
         *         'key' => 'my-custom-cache-key'
143
         *     ],
144
         *     FromFilesSchemaProvider::class => [
145
         *         'files' => ['@runtime/cycle-schema.php']
146
         *     ],
147
         *     FromConveyorSchemaProvider::class => [
148
         *         'generators' => [
149
         *              Generator\SyncTables::class, // sync table changes to database
150
         *          ]
151
         *     ],
152
         * ].
153
         */
154
        'schema-providers' => [
155
            // Uncomment next line to enable a Schema caching in the common cache
156
            // \Yiisoft\Yii\Cycle\Schema\Provider\SimpleCacheSchemaProvider::class => ['key' => 'cycle-orm-cache-key'],
157
158
            // Store generated Schema in the file
159
            PhpFileSchemaProvider::class => [
160
                'mode' => PhpFileSchemaProvider::MODE_WRITE_ONLY,
161
                'file' => 'runtime/schema.php',
162
            ],
163
164
            FromConveyorSchemaProvider::class => [
165
                'generators' => [
166
                    Cycle\Schema\Generator\SyncTables::class, // sync table changes to database
0 ignored issues
show
The type Cycle\Schema\Generator\SyncTables was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
167
                ],
168
            ],
169
        ],
170
171
        /**
172
         * Config for {@see \Yiisoft\Yii\Cycle\Schema\Conveyor\AnnotatedSchemaConveyor}
173
         * Annotated entity directories list.
174
         * {@see \Yiisoft\Aliases\Aliases} are also supported.
175
         */
176
        'entity-paths' => [
177
            '@src',
178
        ],
179
        'conveyor' => AttributedSchemaConveyor::class,
180
    ],
181
    'yiisoft/yii-swagger' => [
182
        'annotation-paths' => [
183
            '@src/Controller',
184
            '@src/Middleware',
185
            '@src/User/Controller',
186
        ],
187
    ],
188
    'yiisoft/yii-sentry' => [
189
        'handleConsoleErrors' => false, // Add to disable console errors.
190
        'options' => [
191
            // Set to `null` to disable error sending (note that in case of web application errors it only prevents
192
            // sending them via HTTP). To disable interactions with Sentry SDK completely, remove middleware and the
193
            // rest of the config.
194
            'dsn' => $_ENV['SENTRY_DSN'] ?? null,
195
            'environment' => $_ENV['YII_ENV'] ?? null, // Add to separate "production" / "staging" environment errors.
196
        ],
197
    ],
198
199
    'yiisoft/yii-debug-api' => [
200
        'allowedIPs' => ['172.0.0.1/10'],
201
    ],
202
];
203