Skip to content

Correct GearmanClient unique parameters - #6241

Open
donatj wants to merge 1 commit into
phpstan:2.2.xfrom
donatj:fix/nullable-strings-on-gearman-unique
Open

Correct GearmanClient unique parameters#6241
donatj wants to merge 1 commit into
phpstan:2.2.xfrom
donatj:fix/nullable-strings-on-gearman-unique

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.
Copilot AI lite review requested due to automatic review settings August 19, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?string for GearmanClient::addTask* methods.
  • Marked unique= as ?string for GearmanClient::do* methods (excluding deprecated GearmanClient::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.

Comment thread resources/functionMap.php
'GearmanClient::clone' => ['GearmanClient'],
'GearmanClient::context' => ['string'],
'GearmanClient::data' => ['string'],
'GearmanClient::do' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GearmanClient::do does not accept ?string, omitted from the changes.

https://www.php.net/manual/en/gearmanclient.do.php

@donatj

donatj commented Aug 19, 2026

Copy link
Copy Markdown
Author

I suspect the failing CI is nothing to do with me from what I can tell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants