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

New failures since upgrade to PHP 8 #1375

Closed
drupol opened this issue Jun 2, 2021 · 3 comments
Closed

New failures since upgrade to PHP 8 #1375

drupol opened this issue Jun 2, 2021 · 3 comments

Comments

@drupol
Copy link
Contributor

drupol commented Jun 2, 2021

Hi,

I upgraded to PHP8 and I'm having issues with some tests now. Those issue were not existing in PHP 7.4.19.

See more context here: loophp/collection#103

I think it's definitely an issue with PHPSpec.
Look, I'm currently working for work and I'm having the same kind of issue, see:

image

The test can be found here: https://github.com/ecphp/cas-bundle/blob/master/spec/EcPhp/CasBundle/Security/Core/User/CasUserProviderSpec.php#L72

@kelunik
Copy link

kelunik commented Jun 2, 2021

The issue is

if (0 !== error_reporting()) {
not checking properly for error suppression. It needs to use a bit mask as documented on PHP.net, as PHP 8 does no longer suppress fatal errors with @.

@kelunik
Copy link

kelunik commented Jun 2, 2021

See https://www.php.net/manual/en/function.set-error-handler

@drupol
Copy link
Contributor Author

drupol commented Jun 2, 2021

I'll submit a PR in 1 or 2 hours. We need this for work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants