#!/usr/bin/env php
<?php
/**
 * Copyright 2020 Adobe
 * All Rights Reserved.
 *
 * NOTICE: Adobe permits you to use, modify, and distribute this file in
 * accordance with the terms of the Adobe license agreement accompanying
 * it.
 */
declare(strict_types=1);

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Symfony\Component\Console\Application;

$kernel = new Sut\AppKernel('prod', false);
$kernel->boot();

$container = $kernel->getContainer();
/** @var Application $application */
$application = $container->get(Application::class);

$applicationData = json_decode(file_get_contents(dirname(__DIR__) . '/composer.json'), true);

$application->setName($applicationData['description'] ?? 'Upgrade Compatibility Tool');
$application->setVersion($applicationData['version'] ?? 'dev');

$application->run();
