-
Notifications
You must be signed in to change notification settings - Fork 456
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
PHP 8.2 | Fix "Use of "parent" in callables is deprecated" notice #1169
PHP 8.2 | Fix "Use of "parent" in callables is deprecated" notice #1169
Conversation
I've searches the code base to see if I could find all affected callbacks. No guarantee I've found them all though. Fixes 1168
dc5c70d
to
f09b080
Compare
Can we maybe get a release for this? Right now, we can't add passing PHP 8.2 builds to Laravel and some of our first party libraries because of the deprecation notices. This is one of the few things that's still blocking us so would be cool to see this getting a tag! : ) |
@driesvints FYI: There are actually still some more PHP 8.2 issues to be fixed in Mockery (or to find work-arounds for). I still need to find the time to write those up properly. |
@jrfnl definitely. But right now, the code of this PR is the only thing we encounter ourselves. Is there a chance we can get that released so you can do the remaining ones in an upcoming release? Dave mentioned he wanted to check into this tomorrow: https://twitter.com/davedevelopment/status/1567170288642572296 |
Not my decision (or responsibility). Just like you, I'm just a user of Mockery and I fully support a release with this fix, even if it's only partial PHP 8.2 support, it gets rid of most issues for most code bases using Mockery. |
Thanks @jrfnl! |
Shouldn't this: |
@cmanley The call is conditional and the code as per this PR follows the code in the condition: if (false === stripos($name, '_mockery_') && get_parent_class($this) && method_exists(get_parent_class($this), '__isset')) { |
I've searched the code base to see if I could find all affected callbacks. No guarantee I've found them all though, though a test run against PHP 8.2 with the testsuite of this codebase no longer shows this particular error with the patch applied.
Fixes #1168