Skip to content

feat: Implement PSR-18 ClientInterface in IClient#59530

Open
SMillerDev wants to merge 1 commit intonextcloud:masterfrom
SMillerDev:feat/http/psr-18
Open

feat: Implement PSR-18 ClientInterface in IClient#59530
SMillerDev wants to merge 1 commit intonextcloud:masterfrom
SMillerDev:feat/http/psr-18

Conversation

@SMillerDev
Copy link
Copy Markdown
Contributor

@SMillerDev SMillerDev commented Apr 9, 2026

Summary

This makes sure the IClient is compliant with PSR-18. This means that any PSR-18 client could be dropped in as a backing client in the future, and it also means that any library using PSR-18 to communicate with a HTTP client can use IClient

TODO

  • Make sure all CI works

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@SMillerDev SMillerDev requested a review from a team as a code owner April 9, 2026 09:22
@SMillerDev SMillerDev requested review from ArtificialOwl, artonge, leftybournes and salmart-dev and removed request for a team April 9, 2026 09:22
@artonge artonge requested review from come-nc and provokateurin April 9, 2026 10:37
@susnux susnux added enhancement 3. to review Waiting for reviews labels Apr 9, 2026
@susnux susnux added this to the Nextcloud 34 milestone Apr 9, 2026
@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Apr 9, 2026

composer run cs:fix should fix the code style.

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
*
* @return ResponseInterface PSR-7 response interface
*
* @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missince @since 34.0.0

Comment on lines +482 to +491
/**
* Sends a PSR-7 request and returns a PSR-7 response, part of the PSR-18 interface.
* This is a thin wrapper arround the Guzzle Client implementation
*
* @param RequestInterface $request PSR-7 request interface
*
* @return ResponseInterface PSR-7 response interface
*
* @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/**
* Sends a PSR-7 request and returns a PSR-7 response, part of the PSR-18 interface.
* This is a thin wrapper arround the Guzzle Client implementation
*
* @param RequestInterface $request PSR-7 request interface
*
* @return ResponseInterface PSR-7 response interface
*
* @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
*/

This is not needed as the phpdoc is also inherited from the interface. Also this usually leads to the docs getting out of sync later on.

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

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP client docs

5 participants