You cannot access the constant through the name of the trait, but, you can access the constant through the class that uses the trait. PHP 8.2 was released on November 25, 2021, and it introduced many new features and improvements…
Catégorie : API Platform
PHP 8.2 is the latest version of the popular programming language and it comes with a range of new features and updates. One of the most notable changes in PHP 8.2 is the deprecation of dynamic properties. This means that…
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…
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;