Issues (13)

public/install.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
$root = '../';
6
$extractDir = '../composer';
7
8
if (file_exists($root . 'vendor')) {
9
    echo 'Composer already installed, redirect to index...';
10
    header('Location: /');
11
    exit;
12
}
13
14
if (file_exists($extractDir . '/vendor/autoload.php') === true) {
15
    echo "Extracted autoload already exists. Skipping phar extraction as presumably it's already extracted.";
16
} else {
17
    $composerPhar = $root . 'composer.phar';
18
    if (!file_exists($composerPhar)) {
19
        $composer = file_get_contents('https://getcomposer.org/download/latest-stable/composer.phar');
20
        file_put_contents($composerPhar, $composer);
21
    }
22
    $composerExtract = new Phar($composerPhar);
23
    $composerExtract->extractTo($extractDir);
24
}
25
26
require $extractDir . '/vendor/autoload.php';
27
28
chdir('../');
29
30
//Use the Composer classes
31
use Composer\Console\Application;
32
use Symfony\Component\Console\Input\ArrayInput;
0 ignored issues
show
The type Symfony\Component\Console\Input\ArrayInput 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...
33
34
$input = new ArrayInput(['command' => 'install']);
35
$application = new Application();
36
$application->setAutoExit(false);
37
$application->run($input);
38
39
header('Location: /');
40
exit;
41