Repository navigation
fix(async): fail at once when a handler's method is not callable from outside - #54
Merged
ogorzalka merged 2 commits intoNov 25, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
fix/non-public-handler-method-fails-at-resolution(basemainat 22bc9be). Found by PHPStan level 7 (CallableDescriptor::resolve()returns an array it cannot prove callable).Bug
CallableDescriptor::resolve('Class@method')checkedmethod_exists()only. A private or protected method passes it, so the "callable" returned was not callable from outside;AsyncRunner::call()then threwBadFunctionCallExceptioninside the call, whichretryOrFail()treats as a transient failure: the execution was retried as many times astriesallowed, failing the same way each time.Fix
resolve()checksis_callable()on the pair (so__call/__callStatichandlers still resolve) and throwsUnresolvableHandler::notPublicMethod()(new named factory) otherwise.AsyncRunner::run()already routes resolution errors tofail(), with no retry.Proof
New test in
CallableDescriptorTest(a class with a protected method): fails without the fix (resolve returned an uncallable array), passes with it. 553 pass + 1 incomplete (onmaintoo). CHANGELOG[Unreleased]/ Fixed added.Not verified
Retry behaviour end to end was not re-run in WordPress; the claim that the old path retried comes from reading
AsyncRunner::run()/retryOrFail(), not from a failing test of the retry count. Semgrep not run.