[Discovery One] Upgrade to Symfony 4 and PHPUnit 7

This commit is contained in:
Andrés Montañez
2018-03-29 20:19:35 -03:00
parent 23dae99c1a
commit 05d9cf0b80
30 changed files with 51 additions and 47 deletions
+2 -2
View File
@@ -17,6 +17,6 @@ namespace Mage;
*/
class Mage
{
const VERSION = '3.4.0';
const CODENAME = 'Nostromo';
const VERSION = '4.x';
const CODENAME = 'Discovery One';
}
+3 -3
View File
@@ -17,7 +17,7 @@ use Symfony\Component\Finder\SplFileInfo;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
use Symfony\Component\Console\Event\ConsoleErrorEvent;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Application;
use Symfony\Component\Yaml\Parser;
@@ -46,12 +46,12 @@ class MageApplication extends Application
$dispatcher = new EventDispatcher();
$this->setDispatcher($dispatcher);
$dispatcher->addListener(ConsoleEvents::EXCEPTION, function (ConsoleExceptionEvent $event) {
$dispatcher->addListener(ConsoleEvents::ERROR, function (ConsoleErrorEvent $event) {
$output = $event->getOutput();
$command = $event->getCommand();
$output->writeln(sprintf('Oops, exception thrown while running command <info>%s</info>', $command->getName()));
$exitCode = $event->getExitCode();
$event->setException(new \LogicException('Caught exception', $exitCode, $event->getException()));
$event->setError(new \LogicException('Caught exception', $exitCode, $event->getError()));
});
$this->runtime = $this->instantiateRuntime();