Skip to content

[Console] Throwable exceptions not handled properly, exit code is 0 #20775

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy