declare(strict_types=1); namespace App\Dto; use Symfony\Component\Validator\Constraints as Assert; /** * Validated payload for PATCH /{id}. * * All fields are nullable so PATCH callers can send only the fields * they want to change. The controller checks each for null and * skips the corresponding entity setter. */ final readonly class UpdateDto { public function __construct( #[Assert\Length(max: 255)] public ?string $title = null, public ?bool $done = null, ) { } }