#!/usr/bin/env php
<?php declare(strict_types=1);

use Symfony\Component\DependencyInjection\Container;
use Symplify\EasyCodingStandard\Console\Application;
use Symplify\PackageBuilder\Console\ThrowableRenderer;

require_once __DIR__ . '/autoload.php';

// performance boost
gc_disable();

try {
    /** @var Container $container */
    $container = require __DIR__ . '/container.php';

    $application = $container->get(Application::class);
    exit($application->run());
} catch (Throwable $throwable) {
    (new ThrowableRenderer())->render($throwable);
    exit($throwable->getCode());
}
