Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP8 fatal error suppression #4309

Closed
jtraulle opened this issue Jan 3, 2021 · 5 comments
Closed

PHP8 fatal error suppression #4309

jtraulle opened this issue Jan 3, 2021 · 5 comments

Comments

@jtraulle
Copy link

jtraulle commented Jan 3, 2021

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 ...

@mergeable
Copy link

mergeable bot commented Jan 3, 2021

This bug report is missing a link to reproduction on phpstan.org.
It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

Hello, PHPStan out of the box does not output this message. This is most likely caused by your custom error handler registered most likely by a bootstrap file.

@dktapps
Copy link
Contributor

dktapps commented Jan 3, 2021

mkdir doesn't produce a fatal error anyway, does it?

@ondrejmirtes
Copy link
Member

Yeah, it doesn't, it's a warning.

@github-actions
Copy link

github-actions bot commented May 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants