resume/bin/console

42 lines
1.2 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
use Sikofitt\Command\SchemaValidationCommand;
use Symfony\Component\{
Console\Input\ArgvInput,
Console\Input\InputOption,
Debug\Debug
};
set_time_limit(0);
/**
* @var Composer\Autoload\ClassLoader $loader
*/
require_once __DIR__. '/../vendor/autoload.php';
$input = new ArgvInput();
$app = new App();
require_once $app->getAppDirectory() . '/providers.php';
if($app->getDebug()) {
Debug::enable();
}
$application = $app['console'];
$application->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', 'dev'));
$application->setDispatcher($app['dispatcher']);
$twigDebugCommand = new Symfony\Bridge\Twig\Command\DebugCommand('twig:debug');
$twigDebugCommand->setTwigEnvironment($app['twig']);
$twigLintCommand = new \Symfony\Bridge\Twig\Command\LintCommand('twig:lint');
$twigLintCommand->setTwigEnvironment($app['twig']);
$application->add(new SchemaValidationCommand());
$application->add($twigDebugCommand);
$application->add($twigLintCommand);
$application->add(new \Symfony\CS\Console\Command\FixCommand());
$application->add(new Sikofitt\Command\CreatePdfCommand());
$application->run($input);