-
Notifications
You must be signed in to change notification settings - Fork 110
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
Error running tests with php7.4 #655
Comments
It seems that it's because of this function declaration: Line 923 in 362b93b
If you simply remove the |
Hi @randykinne, The The bugsnag-php library is completely type safe and backwards compatible to php5.5. I believe this is more likely an issue with Phake incorrectly catching this as an error. Perhaps you could ask their support team for clarification on this or is there is a suggested workaround. |
Hi @johnkiely1! It isn't so much an issue with being backwards compatible for our general usage of the library, but rather that Phake cannot create a mock of this class because of the strong typing done on When you create a mock with Phake, Phake goes and creates mock classes for every type that's referenced in a method signature on the class. This includes private methods, in order to support this feature. So as long as the new As I said in my comment above, the solution is to remove |
Hi @chelsea-youmans, I see what you are saying. So in essence because of how Phake mocks classes it can end up creating an implied dependency. To me this does still sound like something Phake should address as it seems like this could cause a lot of false positives across a lot of libraries. Going to close this out as theres not much we can do on it. Either way it seems you have found a workaround. @randykinne does this work for you? |
Hi @johnkiely1, I have gone ahead and opened a pull request for the fix I had suggested: #657 |
Describe the bug
While upgrading our project to use version 3.29, we're encountering the following error in our testing suite:
Class UnitEnum does not exist
After investigating it further, it seems that UnitEnum was added to php in php 8, but we couldn't find anywhere where the library explicitly requires php 8 or in update notes
Steps to reproduce
\Bugsnag\Report
classEnvironment
Example code snippet
Error messages:
The text was updated successfully, but these errors were encountered: