mirror of
https://github.com/jbcr/Win32ServiceBundle.git
synced 2026-03-24 08:52:10 +01:00
26 lines
755 B
PHP
Executable File
26 lines
755 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use Win32ServiceBundle\Tests\Application\Kernel;
|
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
|
|
|
if (!is_dir(dirname(__DIR__, 3) . '/vendor')) {
|
|
throw new LogicException('Dependencies are missing. Try running "composer install".');
|
|
}
|
|
|
|
if (!is_file(dirname(__DIR__, 3) . '/vendor/autoload_runtime.php')) {
|
|
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
|
}
|
|
|
|
$_SERVER['APP_RUNTIME_OPTIONS'] = [
|
|
'project_dir' => dirname(__DIR__),
|
|
];
|
|
|
|
require_once dirname(__DIR__, 3) . '/vendor/autoload_runtime.php';
|
|
|
|
return function (array $context) {
|
|
$kernel = new Kernel($context['APP_ENV'], (bool)$context['APP_DEBUG']);
|
|
|
|
return new Application($kernel);
|
|
};
|