Files
2024-07-25 16:30:25 +02:00

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);
};