Thanks to visit codestin.com
Credit goes to github.com

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions