Issues (867)

blog/public/index.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
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. 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...
6
7
if (getenv('YII_C3')) {
8
    $c3 = dirname(__DIR__) . '/c3.php';
9
    if (file_exists($c3)) {
10
        require_once $c3;
11
    }
12
}
13
14
/**
15
 * @psalm-var string $_SERVER['REQUEST_URI']
16
 */
17
// PHP built-in server routing.
18
if (PHP_SAPI === 'cli-server') {
19
    // Serve static files as is.
20
    /** @psalm-suppress MixedArgument */
21
    $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
22
    if (is_file(__DIR__ . $path)) {
23
        return false;
24
    }
25
26
    // Explicitly set for URLs with dot.
27
    $_SERVER['SCRIPT_NAME'] = '/index.php';
28
}
29
30
chdir(dirname(__DIR__));
31
require_once dirname(__DIR__) . '/autoload.php';
32
33
// Run HTTP application runner
34
$runner = new HttpApplicationRunner(
35
    rootPath: dirname(__DIR__),
36
    debug: $_ENV['YII_DEBUG'],
37
    checkEvents: $_ENV['YII_DEBUG'],
38
    environment: $_ENV['YII_ENV']
39
);
40
$runner->run();
41