Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Exit status is 0 on PHP7 when there is a \Throwable exception #18484

Copy link
Copy link
Closed
@acasademont

Description

@acasademont
Issue body actions

Hi!

Pretty basic example

<?php
$a = null;
$a->getId();

This in PHP7 will throw an \Error, which implements the \Throwable interface. However, on https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Application.php#L118 we are only catching \Exception to set the status code to 1. As a result, those especial exceptions in the console end up with an 0 exit status code, when it should be 1 as with all other normal exceptions. Thanks! Can work on a PR if needed :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.