Commit 579a25e7 authored by Hendrik Heneke's avatar Hendrik Heneke
Browse files

Removed auto discovery and composer binary.

parent 6c5e0e8f
Pipeline #371 passed with stage
in 31 seconds
......@@ -40,9 +40,6 @@
"HHIT\\ConfigGenerator\\Tests\\": "tests/"
}
},
"bin": [
"bin/cfgen"
],
"scripts": {
"build:phar": "php -d phar.readonly=0 build-phar.php",
"test-run:bin": "bin/cfgen generate-configs --env test --project fixture --overwrite",
......
......@@ -11,28 +11,11 @@ if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
set_time_limit(0);
$candidates = [
dirname(__DIR__) . '/../../autoload.php' => dirname(__DIR__) . '/../../../',
dirname(__DIR__) . '/vendor/autoload.php' => dirname(__DIR__)
];
$autoloaderPath = null;
$projectDir = null;
foreach ($candidates as $autoloaderPathCandidate => $projectDirCandidate) {
if (file_exists($autoloaderPathCandidate)) {
$autoloaderPath = $autoloaderPathCandidate;
$projectDir = $projectDirCandidate;
break;
}
}
if (null === $autoloaderPath) {
throw new RuntimeException('Unable to locate autoload.php file.');
}
require_once $autoloaderPath;
require_once __DIR__ . '/../vendor/autoload.php';
unset($candidates, $autoloaderPathCandidate, $pojectDirCandidate);
$application = new Application('Configuration Generator');
$application->add(new GenerateConfigsCommand($projectDir));
$application->add(new GenerateConfigsCommand(getcwd()));
$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], 'dev', true)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment