Skip to content

PHP8 fatal error suppression #4309

@jtraulle

Description

@jtraulle

Bug report

Since PHP 8, @ Error Suppression operator does not silent fatal errors anymore.
See https://php.watch/versions/8.0/fatal-error-suppression for more.

For exemple, this line :
https://github.com/phpstan/phpstan-rrc/blob/3a08cb018572938ca6b90f861c5fbca17baeab4c/src/Command/CommandHelper.php#L238

now output :

Warning Error: mkdir(): File exists
In [phar:///var/www/html/vendor/phpstan/phpstan/phpstan/src/Command/CommandHelper.php, line 183]

Nothing is really broken but the error output is not expected and might be confusing for some people ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions