From f3707ca2871f5cd2988b6a7fdb9deee8d1916a1d Mon Sep 17 00:00:00 2001 From: Matthieu Date: Mon, 15 Jun 2026 17:06:10 +0200 Subject: [PATCH] style(shared) : importe Throwable dans UploadedDocumentProcessor Conforme a la regle php-cs-fixer global_namespace_import (gate CI Backend). --- .../ApiPlatform/State/UploadedDocumentProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Shared/Infrastructure/ApiPlatform/State/UploadedDocumentProcessor.php b/src/Shared/Infrastructure/ApiPlatform/State/UploadedDocumentProcessor.php index 26e9d2b..818aeb4 100644 --- a/src/Shared/Infrastructure/ApiPlatform/State/UploadedDocumentProcessor.php +++ b/src/Shared/Infrastructure/ApiPlatform/State/UploadedDocumentProcessor.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException; use Symfony\Component\Security\Core\User\UserInterface; +use Throwable; /** * Processor d'ecriture de l'upload generique (POST /api/uploaded_documents). @@ -68,7 +69,7 @@ final class UploadedDocumentProcessor implements ProcessorInterface try { return $this->persistProcessor->process($document, $operation, $uriVariables, $context); - } catch (\Throwable $e) { + } catch (Throwable $e) { // La persistance a echoue APRES l'ecriture disque (erreur DB, FK...) : // on supprime le fichier orphelin pour ne pas le laisser sans ligne // uploaded_document correspondante, puis on relaie l'erreur.