Skip to content

feat: add PUT, HEAD, DELETE, and PATCH HTTP methods#6

Open
soyuka wants to merge 2 commits intodunglas:mainfrom
soyuka:feat/http-methods
Open

feat: add PUT, HEAD, DELETE, and PATCH HTTP methods#6
soyuka wants to merge 2 commits intodunglas:mainfrom
soyuka:feat/http-methods

Conversation

@soyuka
Copy link
Collaborator

@soyuka soyuka commented Feb 23, 2026

Summary

  • Adds put(), head(), delete(), and patch() methods to SolidClient
  • put() supports optional LDP BasicContainer Link header for container creation
  • patch() defaults to application/sparql-update, also supports text/n3 for N3 Patch
  • Applies CS Fixer auto-fixes (explicit nullable types, \sprintf)

Stack

1/8 — This PRmain

Test plan

  • Unit tests for all 4 new methods with MockHttpClient
  • Existing SmokeTest still passes
  • CS Fixer clean

🤖 Generated with Claude Code

@soyuka
Copy link
Collaborator Author

soyuka commented Feb 23, 2026

Stack: 1/6 → main

soyuka and others added 2 commits February 23, 2026 21:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the missing HTTP method wrappers to SolidClient:
- put(): creates/overwrites resources, with optional container Link header
- head(): retrieves resource metadata headers
- delete(): removes resources
- patch(): updates resources via SPARQL Update or N3 Patch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dunglas dunglas requested a review from Copilot March 19, 2026 11:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the core SolidClient HTTP surface area by adding first-class support for additional HTTP verbs commonly used in Solid/LDP interactions, while also applying minor code-style fixes (explicit nullable types and fully-qualified \sprintf).

Changes:

  • Add put(), head(), delete(), and patch() to SolidClient (with patch() defaulting to application/sparql-update).
  • Add PHPUnit coverage for the new methods using Symfony’s MockHttpClient/MockResponse.
  • Apply CS Fixer-driven signature/style updates (explicit ?Type nullability, \sprintf).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/SolidClientTest.php Adds unit tests covering PUT/HEAD/DELETE/PATCH behavior and headers/body defaults.
src/SolidClientFactory.php Makes the optional OidcClient argument explicitly nullable (?OidcClient).
src/SolidClient.php Implements the new HTTP verb methods and updates a few signatures/sprintf calls.
src/Bundle/Form/SolidLoginType.php Makes the validation callback closure static (no $this capture).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants