Move request parsing into DTOs via fromRequest(), expand update handler

Each DTO now owns its own parsing logic via fromRequest(), removing
the normalization layer from MicropubRequest entirely. UpdateHandler
gains delete support and allows replace/add/delete to compose in a
single request rather than being mutually exclusive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jonny Barnes 2026-03-13 20:39:50 +00:00
commit 1137d2a07e
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
8 changed files with 310 additions and 124 deletions

View file

@ -4,8 +4,12 @@ declare(strict_types=1);
namespace App\Services\Micropub\Data;
use Illuminate\Http\Request;
abstract class MicropubData
{
abstract public static function fromRequest(Request $request): static;
abstract public static function fromArray(array $data): static;
abstract public function toArray(): array;