Skip to content

fix: use ClientInterface::request() instead of shorthand post()#55

Open
jjroelofs wants to merge 1 commit into
1.xfrom
fix/endpoint-checker-phpstan
Open

fix: use ClientInterface::request() instead of shorthand post()#55
jjroelofs wants to merge 1 commit into
1.xfrom
fix/endpoint-checker-phpstan

Conversation

@jjroelofs

Copy link
Copy Markdown
Contributor

Summary

  • EndpointChecker::probeUrl() calls $this->httpClient->post(), but post() is a convenience method on the concrete GuzzleHttp\Client class, not part of GuzzleHttp\ClientInterface. PHPStan correctly flags this as method.notFound.
  • Replaced with $this->httpClient->request('POST', ...) which is defined on the interface.

Test plan

  • docker compose --profile lint run --rm drupal-check passes (was failing, now clean)
  • docker compose --profile lint run --rm drupal-lint passes

GuzzleHttp\ClientInterface does not define post(); that method only
exists on the concrete Client class. PHPStan correctly flags this
as method.notFound. Use request('POST', ...) which is part of the
interface contract.
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.

1 participant