8000 [Console] Throwable exceptions not handled properly, exit code is 0 · Issue #20775 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Console] Throwable exceptions not handled properly, exit code is 0 #20775
Closed
@fredplante

Description

@fredplante

Given an new symfony 3.2 project, with this simple Command :

<?php
namespace AppBundle\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class DemoCommand extends Command
{
    protected function configure()
    {
      $this->setName('app:demo');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
      $input->checkYourself();
    }
}

Running under PHP 5.6.24 :

bin/console app:demo
[output an UndefinedMethodException]
echo $?
255

Running under PHP 7.0.8 :

bin/console app:demo
[output an UndefinedMethodException]
echo $?
0