Skip to content

Application exit code not properly handled, when having fatal exceptions, Symfony 2.8, PHP7 #20110

Closed
@bozerkins

Description

@bozerkins

when a command throws a fatal error in PHP7, the exception produced is handled by global error handler, not application error handler.

thus the error message is properly handled, but the exit code is not.

such code for example (for tests or more) could lead to such behavior, under Symfony 2.8 / PHP 7
$a = null; $a->getSmth();
under PHP 5.3 the above command execution would exit with non zero exit code.
under PHP7.* this would end up with exit code being zero, which is not good.

the problem is in the - Symfony/Component/Console/Application.php:124,
where only \Exception class is catched
#20111

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions