Correct GearmanClient unique parameters - #6241
Open
donatj wants to merge 1 commit into
Open
Conversation
- Marks `unique=` as `?string` on `addTask*` and `do*` methods The ext-gearman signatures accept null for the optional unique key, so passing null was flagged as an error.
There was a problem hiding this comment.
Pull request overview
Updates PHPStan’s internal functionMap.php signature metadata for the Gearman extension so that GearmanClient methods reflect that the unique argument is nullable where the PHP manual documents it as such (unique = null).
Changes:
- Marked
unique=as?stringforGearmanClient::addTask*methods. - Marked
unique=as?stringforGearmanClient::do*methods (excluding deprecatedGearmanClient::do, as noted in the PR description).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
donatj
commented
Aug 19, 2026
| 'GearmanClient::clone' => ['GearmanClient'], | ||
| 'GearmanClient::context' => ['string'], | ||
| 'GearmanClient::data' => ['string'], | ||
| 'GearmanClient::do' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'], |
Author
There was a problem hiding this comment.
GearmanClient::do does not accept ?string, omitted from the changes.
Author
|
I suspect the failing CI is nothing to do with me from what I can tell? |
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.
Marks
unique=as?stringonGearmanClient::addTask*andGearmanClient::do*methodsYou can check the individual definitions -
For whatever reason,
GearmanClient::dodoes not accept?stringand was omitted from the changes, butGearmanClient::do() method is deprecatedso nbd