Aller au contenu

Fikri.fr

Tous sur le développement web

  • Accueil
  • PHP
  • Symfony
  • Laravel
  • JavaScript
  • Angular
  • VueJS
  • ReactJS

Catégorie : API Platform

Call to an undefined method Symfony\Component\Serializer\Normalizer\NormalizerInterface::denormalize().

Publié par Fikri.fr le dans API Platform, laravel, Non classé, php, symfony

In API Platform or in Symfony, If you use a denormalization like this : use Symfony\Component\Serializer\Normalizer\NormalizerInterface; private NormalizerInterface $normalizer; $this->normalizer = $normalizer; $this->normalizer->denormalize($data, Object::class) You need to change it to a denormalizerInterface like this use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; private DenormalizerInterface $denormalizer; $this->denormalizer…

Cannot normalize attribute because the injected serializer is not a normalizer.

Publié par Fikri.fr le dans API Platform, laravel, php, symfony

When using API Platform or symfony serializations, you can get this error This error happens when you use an ObjectNormalizer Symfony\Component\Serializer\Normalizer\ObjectNormalizer instead of an Symfony\Component\Serializer\Normalizer\NormalizerInterface To avoit this error Use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

Rechercher

Articles récents

  • PHP 8.1 Enum
  • Laravel 9
  • Call to an undefined method Symfony\Component\Serializer\Normalizer\NormalizerInterface::denormalize().
  • Cannot normalize attribute because the injected serializer is not a normalizer.
  • React JS : Introduction

Catégories

  • API Platform
  • javascript
  • laravel
  • Non classé
  • php
  • reactjs
  • symfony
  • vuejs

Vue Global

http mailer PHP Symfony tests
Copyright © Fikri.fr | Tous droits réservés.
Thème Fashify par FRT