feat(categories) : add bidirectional piece/component category conversion

Backend service and controller for converting piece categories to component
categories (and vice-versa). Uses raw SQL in a transaction to preserve IDs
and transfer all related data (documents, custom fields, constructeurs).
Includes php-cs-fixer formatting pass on existing controllers/entities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-02-12 14:27:07 +01:00
parent 6300a3588a
commit cd2a3fac55
23 changed files with 821 additions and 340 deletions

View File

@@ -49,11 +49,11 @@ class AuditLog
?array $snapshot = null,
?string $actorProfileId = null,
) {
$this->entityType = $entityType;
$this->entityId = $entityId;
$this->action = $action;
$this->diff = $diff;
$this->snapshot = $snapshot;
$this->entityType = $entityType;
$this->entityId = $entityId;
$this->action = $action;
$this->diff = $diff;
$this->snapshot = $snapshot;
$this->actorProfileId = $actorProfileId;
}
@@ -64,7 +64,7 @@ class AuditLog
$this->createdAt = new DateTimeImmutable();
}
if ($this->id === null) {
if (null === $this->id) {
$this->id = $this->generateCuid();
}
}