mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-24 17:22:06 +01:00
16 lines
569 B
PHP
16 lines
569 B
PHP
<?php
|
|
|
|
use Doctrine\DBAL\Connection;
|
|
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
|
|
use Symfony\Component\Console\Input\ArgvInput;
|
|
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
|
|
$input = new ArgvInput();
|
|
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
|
|
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
|
|
$kernel = new AppKernel($env, $debug);
|
|
$kernel->boot();
|
|
$connection = $kernel->getContainer()->get(Connection::class);
|
|
return ConsoleRunner::createHelperSet($connection);
|