You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that this code is not compatible with PHP 5 and a custom AssertionError that is created from the assert callback feature. We have this at our company but also for instance Drupal 8 has it.
The first frame in such a case does not contain a file nor a line member since that one contains a closure and the second frame is the correct one. First entries from an example stack trace:
A simple and supposed fix for this would be to investigate if the first frame contains {closure} in the function member and then check if the next frame is from assert. Of course, this is no guarantee that one just found the right frame.
What do you think how we should handle this? It is definitely a bug and makes all versions that contain the current logic incompatible with code that uses custom assertion errors via callbacks paired with PHP 5.
The text was updated successfully, but these errors were encountered:
It would definitely mitigate all possible edge cases and you can continue accessing the first frame directly since you can be sure that it has the right format. 👍
Handling of
AssertionError
s was introduced in 5.5 (see this commit) where we have the following lines of code:The problem is that this code is not compatible with PHP 5 and a custom
AssertionError
that is created from the assert callback feature. We have this at our company but also for instance Drupal 8 has it.The first frame in such a case does not contain a
file
nor aline
member since that one contains a closure and the second frame is the correct one. First entries from an example stack trace:A simple and supposed fix for this would be to investigate if the first frame contains
{closure}
in thefunction
member and then check if the next frame is fromassert
. Of course, this is no guarantee that one just found the right frame.What do you think how we should handle this? It is definitely a bug and makes all versions that contain the current logic incompatible with code that uses custom assertion errors via callbacks paired with PHP 5.
The text was updated successfully, but these errors were encountered: