yiisoft /
demo
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | use App\Queue\LoggingAuthorizationHandler; |
||
| 6 | use Cycle\Database\Config\SQLite\FileConnectionConfig; |
||
|
0 ignored issues
–
show
|
|||
| 7 | 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use Yiisoft\ErrorHandler\Middleware\ErrorCatcher; |
||
|
0 ignored issues
–
show
The type
Yiisoft\ErrorHandler\Middleware\ErrorCatcher 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | use Yiisoft\RequestProvider\RequestCatcherMiddleware; |
||
|
0 ignored issues
–
show
The type
Yiisoft\RequestProvider\RequestCatcherMiddleware 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 11 | use Yiisoft\Router\Middleware\Router; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Router\Middleware\Router 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. 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\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. 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\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. 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\Yii\Cycle\Schema\SchemaProviderInterface; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Yii\Cycle\Schema\SchemaProviderInterface 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. 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\Yii\Middleware\Locale; |
||
|
0 ignored issues
–
show
This use statement conflicts with another class in this namespace,
Locale. Consider defining an alias.
Let?s assume that you have a directory layout like this: .
|-- OtherDir
| |-- Bar.php
| `-- Foo.php
`-- SomeDir
`-- Foo.php
and let?s assume the following content of // Bar.php
namespace OtherDir;
use SomeDir\Foo; // This now conflicts the class OtherDir\Foo
If both files PHP Fatal error: Cannot use SomeDir\Foo as Foo because the name is already in use in OtherDir/Foo.php
However, as // Bar.php
namespace OtherDir;
use SomeDir\Foo as SomeDirFoo; // There is no conflict anymore.
Loading history...
The type
Yiisoft\Yii\Middleware\Locale 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. 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\Yii\Middleware\Subfolder; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Yii\Middleware\Subfolder 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. 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\Queue\Adapter\SynchronousAdapter; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Queue\Adapter\SynchronousAdapter 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 18 | |||
| 19 | return [ |
||
| 20 | 'locale' => [ |
||
| 21 | 'locales' => ['en' => 'en-US', 'ru' => 'ru-RU', 'de' => 'de-DE'], |
||
| 22 | 'ignoredRequests' => [ |
||
| 23 | '/gii**', |
||
| 24 | '/debug**', |
||
| 25 | '/inspect**', |
||
| 26 | ], |
||
| 27 | ], |
||
| 28 | 'supportEmail' => '[email protected]', |
||
| 29 | 'middlewares' => [ |
||
| 30 | RequestCatcherMiddleware::class, |
||
| 31 | ErrorCatcher::class, |
||
| 32 | Subfolder::class, |
||
| 33 | Locale::class, |
||
| 34 | Router::class, |
||
| 35 | ], |
||
| 36 | |||
| 37 | 'yiisoft/aliases' => [ |
||
| 38 | 'aliases' => [ |
||
| 39 | '@root' => dirname(__DIR__, 2), |
||
| 40 | '@assets' => '@public/assets', |
||
| 41 | '@assetsUrl' => '@baseUrl/assets', |
||
| 42 | '@baseUrl' => '', |
||
| 43 | '@data' => '@root/data', |
||
| 44 | '@messages' => '@resources/messages', |
||
| 45 | '@public' => '@root/public', |
||
| 46 | '@resources' => '@root/resources', |
||
| 47 | '@runtime' => '@root/runtime', |
||
| 48 | '@src' => '@root/src', |
||
| 49 | '@tests' => '@root/tests', |
||
| 50 | '@views' => '@root/views', |
||
| 51 | '@vendor' => '@root/vendor', |
||
| 52 | ], |
||
| 53 | ], |
||
| 54 | |||
| 55 | 'yiisoft/router-fastroute' => [ |
||
| 56 | 'enableCache' => false, |
||
| 57 | ], |
||
| 58 | |||
| 59 | 'yiisoft/translator' => [ |
||
| 60 | 'locale' => 'en', |
||
| 61 | 'fallbackLocale' => 'en', |
||
| 62 | 'defaultCategory' => 'app', |
||
| 63 | ], |
||
| 64 | |||
| 65 | 'yiisoft/yii-cycle' => [ |
||
| 66 | // DBAL config |
||
| 67 | 'dbal' => [ |
||
| 68 | // SQL query logger. Definition of Psr\Log\LoggerInterface |
||
| 69 | // For example, \Yiisoft\Yii\Cycle\Logger\StdoutQueryLogger::class |
||
| 70 | 'query-logger' => null, |
||
| 71 | // Default database |
||
| 72 | 'default' => 'default', |
||
| 73 | 'aliases' => [], |
||
| 74 | 'databases' => [ |
||
| 75 | 'default' => ['connection' => 'sqlite'], |
||
| 76 | ], |
||
| 77 | 'connections' => [ |
||
| 78 | 'sqlite' => new SQLiteDriverConfig( |
||
| 79 | new FileConnectionConfig(dirname(__DIR__, 2) . '/runtime/database.db') |
||
| 80 | ), |
||
| 81 | ], |
||
| 82 | ], |
||
| 83 | |||
| 84 | // Cycle migration config |
||
| 85 | 'migrations' => [ |
||
| 86 | 'directory' => '@root/migrations', |
||
| 87 | 'namespace' => 'App\\Migration', |
||
| 88 | 'table' => 'migration', |
||
| 89 | 'safe' => false, |
||
| 90 | ], |
||
| 91 | |||
| 92 | /** |
||
| 93 | * SchemaProvider list for {@see \Yiisoft\Yii\Cycle\Schema\Provider\Support\SchemaProviderPipeline} |
||
| 94 | * Array of classname and {@see SchemaProviderInterface} object. |
||
| 95 | * You can configure providers if you pass classname as key and parameters as array: |
||
| 96 | * [ |
||
| 97 | * SimpleCacheSchemaProvider::class => [ |
||
| 98 | * 'key' => 'my-custom-cache-key' |
||
| 99 | * ], |
||
| 100 | * FromFilesSchemaProvider::class => [ |
||
| 101 | * 'files' => ['@runtime/cycle-schema.php'] |
||
| 102 | * ], |
||
| 103 | * FromConveyorSchemaProvider::class => [ |
||
| 104 | * 'generators' => [ |
||
| 105 | * Generator\SyncTables::class, // sync table changes to database |
||
| 106 | * ] |
||
| 107 | * ], |
||
| 108 | * ]. |
||
| 109 | */ |
||
| 110 | 'schema-providers' => [ |
||
| 111 | // Uncomment next line to enable a Schema caching in the common cache |
||
| 112 | // \Yiisoft\Yii\Cycle\Schema\Provider\SimpleCacheSchemaProvider::class => ['key' => 'cycle-orm-cache-key'], |
||
| 113 | |||
| 114 | // Store generated Schema in the file |
||
| 115 | PhpFileSchemaProvider::class => [ |
||
| 116 | 'mode' => PhpFileSchemaProvider::MODE_WRITE_ONLY, |
||
| 117 | 'file' => '@runtime/schema.php', |
||
| 118 | ], |
||
| 119 | |||
| 120 | FromConveyorSchemaProvider::class => [ |
||
| 121 | 'generators' => [ |
||
| 122 | 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 123 | ], |
||
| 124 | ], |
||
| 125 | ], |
||
| 126 | |||
| 127 | /** |
||
| 128 | * Config for {@see \Yiisoft\Yii\Cycle\Schema\Conveyor\AnnotatedSchemaConveyor} |
||
| 129 | * Annotated entity directories list. |
||
| 130 | * {@see \Yiisoft\Aliases\Aliases} are also supported. |
||
| 131 | */ |
||
| 132 | 'entity-paths' => [ |
||
| 133 | '@src', |
||
| 134 | ], |
||
| 135 | 'conveyor' => AttributedSchemaConveyor::class, |
||
| 136 | ], |
||
| 137 | 'yiisoft/yii-swagger' => [ |
||
| 138 | 'annotation-paths' => [ |
||
| 139 | '@src', |
||
| 140 | ], |
||
| 141 | ], |
||
| 142 | |||
| 143 | 'yiisoft/queue' => [ |
||
| 144 | 'handlers' => [ |
||
| 145 | LoggingAuthorizationHandler::NAME => [LoggingAuthorizationHandler::class, 'handle'], |
||
| 146 | ], |
||
| 147 | 'channel-definitions' => [ |
||
| 148 | LoggingAuthorizationHandler::CHANNEL => SynchronousAdapter::class, |
||
| 149 | ], |
||
| 150 | ], |
||
| 151 | |||
| 152 | 'yiisoft/yii-debug-api' => [ |
||
| 153 | 'allowedIPs' => ['172.0.0.1/10'], |
||
| 154 | ], |
||
| 155 | ]; |
||
| 156 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths