File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -349,9 +349,7 @@ use Symfony\Component\HttpFoundation\File\File;
349349use Symfony\Component\Serializer\Annotation\Groups;
350350use Vich\UploaderBundle\Mapping\Annotation as Vich;
351351
352- /**
353- * @Vich\Uploadable
354- */
352+ #[Vich\Uploadable]
355353#[ORM\Entity]
356354#[ApiResource(
357355 normalizationContext: ['groups' => ['book:read']],
@@ -373,9 +371,10 @@ class Book
373371 #[Groups(['book:read'])]
374372 public ?string $contentUrl = null;
375373
376- /**
377- * @Vich\UploadableField(mapping="media_object", fileNameProperty="filePath")
378- */
374+ #[Vich\UploadableField(
375+ mapping: 'media_object',
376+ fileNameProperty: 'filePath',
377+ )]
379378 #[Groups(['book:write'])]
380379 public ?File $file = null;
381380
@@ -404,7 +403,7 @@ final class MultipartDecoder implements DecoderInterface
404403{
405404 public const FORMAT = 'multipart';
406405
407- public function __construct(private RequestStack $requestStack)
406+ public function __construct(private readonly RequestStack $requestStack)
408407 {
409408 }
410409
@@ -459,8 +458,6 @@ final class UploadedFileDenormalizer implements DenormalizerInterface
459458 public function getSupportedTypes(?string $format): array
460459 {
461460 return [
462- 'object' => null,
463- '*' => false,
464461 File::class => true,
465462 ];
466463 }
You can’t perform that action at this time.
0 commit comments