Part-DB.Part-DB-server/bin/console

25 lines
844 B
Text
Raw Normal View History

2019-02-23 16:49:38 +01:00
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
2020-01-07 19:00:11 +01:00
//Increase xdebug.max_nesting_level to 1000 if required (see issue #411)
//Check if xdebug extension is active, and xdebug.max_nesting_level is set to 256 or lower
if (extension_loaded('xdebug') && ((int) ini_get('xdebug.max_nesting_level')) <= 256) {
//Increase xdebug.max_nesting_level to 1000
ini_set('xdebug.max_nesting_level', '1000');
}
2021-10-02 20:53:03 +02:00
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
2020-01-07 19:00:11 +01:00
}
2019-02-23 16:49:38 +01:00
2021-10-02 20:53:03 +02:00
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
2019-02-23 16:49:38 +01:00
2021-10-02 20:53:03 +02:00
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
2019-02-23 16:49:38 +01:00
2021-10-02 20:53:03 +02:00
return new Application($kernel);
};