yiisoft /
demo
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | use Yiisoft\ErrorHandler\ErrorHandler; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use Yiisoft\ErrorHandler\Renderer\JsonRenderer; |
||
|
0 ignored issues
–
show
The type
Yiisoft\ErrorHandler\Renderer\JsonRenderer 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...
|
|||
| 7 | use Yiisoft\Log\Logger; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Log\Logger 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 Yiisoft\Log\Target\File\FileTarget; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Log\Target\File\FileTarget 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\Yii\Runner\Http\HttpApplicationRunner; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Yii\Runner\Http\HttpApplicationRunner 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 | |||
| 11 | /** |
||
| 12 | * @psalm-var string $_SERVER['REQUEST_URI'] |
||
| 13 | */ |
||
| 14 | |||
| 15 | // PHP built-in server routing. |
||
| 16 | if (PHP_SAPI === 'cli-server') { |
||
| 17 | // Serve static files as is. |
||
| 18 | /** @psalm-suppress MixedArgument */ |
||
| 19 | $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); |
||
| 20 | if (is_file(__DIR__ . $path)) { |
||
| 21 | return false; |
||
| 22 | } |
||
| 23 | |||
| 24 | // Explicitly set for URLs with dot. |
||
| 25 | $_SERVER['SCRIPT_NAME'] = '/index.php'; |
||
| 26 | } |
||
| 27 | |||
| 28 | require_once dirname(__DIR__) . '/autoload.php'; |
||
| 29 | |||
| 30 | if (getenv('YII_ENV') === 'test') { |
||
| 31 | $c3 = dirname(__DIR__) . '/c3.php'; |
||
| 32 | if (file_exists($c3)) { |
||
| 33 | require_once $c3; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | // Run HTTP application runner |
||
| 38 | $runner = (new HttpApplicationRunner( |
||
| 39 | rootPath: dirname(__DIR__), |
||
| 40 | debug: $_ENV['YII_DEBUG'], |
||
| 41 | checkEvents: $_ENV['YII_DEBUG'], |
||
| 42 | environment: $_ENV['YII_ENV'] |
||
| 43 | )) |
||
| 44 | ->withTemporaryErrorHandler( |
||
| 45 | new ErrorHandler( |
||
| 46 | new Logger([new FileTarget(dirname(__DIR__) . '/runtime/logs/app.log')]), |
||
| 47 | new JsonRenderer(), |
||
| 48 | ) |
||
| 49 | ); |
||
| 50 | $runner->run(); |
||
| 51 |
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