Skip to content

Commit

Permalink
Fix using final class
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed Jun 5, 2024
1 parent bfeba75 commit 3c63c9e
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 86 deletions.
13 changes: 8 additions & 5 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ parameters:
- identifier: missingType.iterableValue
- '/Method FluxSE\\OdooApiClient\\Manager\\ModelListManager::(find|findBy|findByIds)\(\) should return (array<|\()T of FluxSE\\OdooApiClient\\Model\\BaseInterface(>|\)\|null) but returns mixed\./'
- '/Method FluxSE\\OdooApiClient\\Serializer\\(Json|Xml)Rpc\\(Json|Xml)RpcSerializerHelper::decodeResponseBody\(\) should return array\|bool\|int\|string but returns mixed\./'

-
message: '/Class FluxSE\\OdooApiClient\\Serializer\\OdooNormalizer extends \@final class Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer\./'
count: 1
path: src/Serializer/OdooNormalizer.php
-
message: '/Parameter #1 \$onFulfilled of method Http\\Promise\\Promise<mixed>::then\(\) expects \(callable\(mixed\): Psr\\Http\\Message\\ResponseInterface\)\|null, Closure\(Psr\\Http\\Message\\ResponseInterface\): Psr\\Http\\Message\\ResponseInterface given\./'
count: 1
path: src/HttPlug/Plugin/OdooApiErrorPlugin.php
-
message: '/Instantiated class Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader not found\./'
count: 1
path: src/Serializer/Factory/SerializerFactory.php
-
message: '/Method FluxSE\\OdooApiClient\\Serializer\\OdooNormalizer::normalize\(\) return type with generic class ArrayObject does not specify its types: TKey, TValue\./'
count: 1
path: src/Serializer/OdooNormalizer.php
# Symfony 5.4
- '/Method FluxSE\\OdooApiClient\\Serializer\\(Json|Xml)Rpc\\(Json|Xml)RpcSerializerHelper::deserializeResponseBody\(\) should return T of object but returns mixed\./'
-
Expand Down
73 changes: 73 additions & 0 deletions src/PropertyAccess/OdooPropertyAccessor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php

declare(strict_types=1);

namespace FluxSE\OdooApiClient\PropertyAccess;

use FluxSE\OdooApiClient\Model\OdooRelation;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\PropertyAccess\PropertyPathInterface;

final class OdooPropertyAccessor implements PropertyAccessorInterface
{
public function __construct(private PropertyAccessorInterface $decoratedPropertyAccessor)
{
}

public function setValue(object|array &$objectOrArray, PropertyPathInterface|string $propertyPath, mixed $value): void
{
/**
* Override to set null when original value is false
*
* Because null value is transformed to false by Odoo API
* There is no other way to do it simply with any features given by Symfony Serializer
*/

$this->decoratedPropertyAccessor->setValue($objectOrArray, $propertyPath, $value);

if (false !== $value) {
return;
}

$newValue = $this->decoratedPropertyAccessor->getValue($objectOrArray, $propertyPath);

if (false === $newValue) {
return;
}

// set null instead of false
$this->decoratedPropertyAccessor->setValue($objectOrArray, $propertyPath, null);
}

public function getValue(object|array $objectOrArray, PropertyPathInterface|string $propertyPath): mixed
{
/**
* Specific case of normalized data returned as null instead of being just transformed
*/
$value = $this->decoratedPropertyAccessor->getValue($objectOrArray, $propertyPath);

if (false === $value instanceof OdooRelation) {
return $value;
}

if (null !== $value->getCommand()) {
return $value;
}

if (null !== $value->getId()) {
return $value;
}

return null;
}

public function isWritable(object|array $objectOrArray, PropertyPathInterface|string $propertyPath): bool
{
return $this->decoratedPropertyAccessor->isWritable($objectOrArray, $propertyPath);
}

public function isReadable(object|array $objectOrArray, PropertyPathInterface|string $propertyPath): bool
{
return $this->decoratedPropertyAccessor->isReadable($objectOrArray, $propertyPath);
}
}
69 changes: 38 additions & 31 deletions src/Serializer/Factory/SerializerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace FluxSE\OdooApiClient\Serializer\Factory;

use Doctrine\Common\Annotations\AnnotationReader;
use FluxSE\OdooApiClient\PropertyAccess\OdooPropertyAccessor;
use FluxSE\OdooApiClient\Serializer\JsonRpc\JsonRpcDecoder;
use FluxSE\OdooApiClient\Serializer\JsonRpc\JsonRpcEncoder;
use FluxSE\OdooApiClient\Serializer\NullableDateTimeDenormalizer;
Expand All @@ -17,6 +18,7 @@
use FluxSE\OdooApiClient\Serializer\OdooRelationsNormalizer;
use FluxSE\OdooApiClient\Serializer\XmlRpc\XmlRpcDecoder;
use FluxSE\OdooApiClient\Serializer\XmlRpc\XmlRpcEncoder;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor;
Expand All @@ -31,6 +33,7 @@
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Serializer;

final class SerializerFactory implements SerializerFactoryInterface
Expand Down Expand Up @@ -99,40 +102,44 @@ public function setupObjectNormalizer(): OdooNormalizer
new CamelCaseToSnakeCaseNameConverter()
);

$propertyAccessor = PropertyAccess::createPropertyAccessor();

return new OdooNormalizer(
$classMetadataFactory,
$metadataAwareNameConverter,
null,
new PropertyInfoExtractor(
[
new ReflectionExtractor(),
new SerializerExtractor($classMetadataFactory),
],
[
new PhpDocExtractor(),
new ReflectionExtractor(),
],
[
new PhpDocExtractor(),
],
[
new ReflectionExtractor(),
],
new ObjectNormalizer(
$classMetadataFactory,
$metadataAwareNameConverter,
new OdooPropertyAccessor($propertyAccessor),
new PropertyInfoExtractor(
[
new ReflectionExtractor(),
new SerializerExtractor($classMetadataFactory),
],
[
new PhpDocExtractor(),
new ReflectionExtractor(),
],
[
new PhpDocExtractor(),
],
[
new ReflectionExtractor(),
],
[
new ReflectionExtractor(),
]
),
null,
null,
[
new ReflectionExtractor(),
// => array to model
AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT => true,
// => model to array
AbstractObjectNormalizer::SKIP_NULL_VALUES => true,
AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => function ($object) {
return $object->getId() ?? 0;
}
]
),
null,
null,
[
// => array to model
AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT => true,
// => model to array
AbstractObjectNormalizer::SKIP_NULL_VALUES => true,
AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => function ($object) {
return $object->getId() ?? 0;
}
]
)
);
}

Expand Down
75 changes: 25 additions & 50 deletions src/Serializer/OdooNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@
use FluxSE\OdooApiClient\Api\RequestBodyInterface;
use FluxSE\OdooApiClient\Model\BaseInterface;
use FluxSE\OdooApiClient\Model\Common\Version;
use FluxSE\OdooApiClient\Model\OdooRelation;
use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerInterface;

final class OdooNormalizer extends ObjectNormalizer
final class OdooNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface
{
public function __construct(private ObjectNormalizer $decoratedObjectNormalizer)
{
}

public function getSupportedTypes(?string $format): array
{
return [
Expand All @@ -24,59 +30,28 @@ public function getSupportedTypes(?string $format): array
];
}

protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []): void
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
/**
* Override to set null when original value is false
*
* Because null value is transformed to false by Odoo API
* There is no other way to do it simply with any features given by Symfony Serializer
*/

parent::setAttributeValue($object, $attribute, $value, $format, $context);

if (false !== $value) {
return;
}

try {
$newValue = parent::getAttributeValue($object, $attribute, $format, $context);
} catch (NoSuchPropertyException $e) {
// ignore not found properties like the setAttributeValue above
return;
}

if (false === $newValue) {
return;
}

parent::setAttributeValue($object, $attribute, null, $format, $context);
return $this->decoratedObjectNormalizer->denormalize($data, $type, $format, $context);
}

protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
{
/**
* Specific case of normalized data returned as null instead of being just transformed
*/
$value = parent::getAttributeValue($object, $attribute, $format, $context);

$skipNullValue = $context[self::SKIP_NULL_VALUES] ?? $this->defaultContext[self::SKIP_NULL_VALUES] ?? false;
if (!$skipNullValue) {
return $value;
}

if (false === $value instanceof OdooRelation) {
return $value;
}
return $this->decoratedObjectNormalizer->supportsDenormalization($data, $type, $format, $context);

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.

Check failure on line 40 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsDenormalization() invoked with 4 parameters, 2-3 required.
}

if (null !== $value->getCommand()) {
return $value;
}
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.1, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.3, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.2, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.3, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.2, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.2, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.2, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.2, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.3, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.1, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.2, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.3, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.2, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.3, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.3, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.1, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.3, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.2, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.2, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.3, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.2, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.3, Symfony ^7.1

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.1, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.3, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue

Check failure on line 43 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.1, Symfony ^6.4

Method FluxSE\OdooApiClient\Serializer\OdooNormalizer::normalize() return type with generic class ArrayObject does not specify its types: TKey, TValue
{
return $this->decoratedObjectNormalizer->normalize($object, $format, $context);
}

if (null !== $value->getId()) {
return $value;
}
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return $this->decoratedObjectNormalizer->supportsNormalization($data, $format, $context);

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 13, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 14, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 15, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.2, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 16, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.3, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.

Check failure on line 50 in src/Serializer/OdooNormalizer.php

View workflow job for this annotation

GitHub Actions / Odoo 17, PHP 8.1, Symfony ^6.4

Method Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer::supportsNormalization() invoked with 3 parameters, 1-2 required.
}

return null;
public function setSerializer(SerializerInterface $serializer): void
{
$this->decoratedObjectNormalizer->setSerializer($serializer);
}
}

0 comments on commit 3c63c9e

Please sign in to comment.