Skip to content

Commit

Permalink
Restricted Symfony update to 6.4.6 due to issue in latest version 6.4…
Browse files Browse the repository at this point in the history
….7 (#365)
  • Loading branch information
kedarkhaire authored May 24, 2024
1 parent 9c5d2fd commit 3073f76
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"php-http/message-factory": "^1.0",
"phpdocumentor/reflection-docblock": "^5.0",
"psr/http-message": "^1.0 || ^2.0",
"symfony/options-resolver": "^6.3",
"symfony/property-access": "^6.3",
"symfony/property-info": "^6.3",
"symfony/serializer": "^6.3.11"
"symfony/options-resolver": "^6.4.6",
"symfony/property-access": "^6.4.6",
"symfony/property-info": "^6.4.6",
"symfony/serializer": "^6.4.6"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.4.0",
Expand All @@ -46,9 +46,12 @@
"phpmetrics/phpmetrics": "^2.7",
"phpunit/phpunit": "^9.6",
"sebastian/comparator": "^4.0.5",
"symfony/cache": "^6.3",
"symfony/cache": "^6.4.6",
"vimeo/psalm": "^5.20"
},
"conflict": {
"symfony/serializer": ">6.4.6"
},
"autoload": {
"psr-4": {
"Apigee\\Edge\\": "src"
Expand Down
11 changes: 6 additions & 5 deletions src/Api/Monetization/Denormalizer/ReportCriteriaDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait;
use Apigee\Edge\Denormalizer\ObjectDenormalizer;
use Apigee\Edge\Exception\InvalidArgumentException;
use DateTimeZone;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
Expand All @@ -44,10 +45,10 @@ class ReportCriteriaDenormalizer extends ObjectDenormalizer
/**
* ReportsCriteriaDenormalizer constructor.
*
* @param \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface|null $classMetadataFactory
* @param \Symfony\Component\Serializer\NameConverter\NameConverterInterface|null $nameConverter
* @param \Symfony\Component\PropertyAccess\PropertyAccessorInterface|null $propertyAccessor
* @param \Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface|null $propertyTypeExtractor
* @param ClassMetadataFactoryInterface|null $classMetadataFactory
* @param NameConverterInterface|null $nameConverter
* @param PropertyAccessorInterface|null $propertyAccessor
* @param PropertyTypeExtractorInterface|null $propertyTypeExtractor
*/
public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null)
{
Expand Down Expand Up @@ -119,7 +120,7 @@ public function denormalize($data, $type, $format = null, array $context = [])

// According to the API documentation it is always UTC.
// https://docs.apigee.com/api-platform/monetization/create-reports#createreportdefapi
$this->fixTimeZoneOnDenormalization($data, $denormalized, new \DateTimeZone('UTC'));
$this->fixTimeZoneOnDenormalization($data, $denormalized, new DateTimeZone('UTC'));

return $denormalized;
}
Expand Down
14 changes: 7 additions & 7 deletions src/Denormalizer/ObjectDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
*/
class ObjectDenormalizer implements DenormalizerInterface, SerializerAwareInterface
{
/** @var \Symfony\Component\Serializer\Normalizer\ObjectNormalizer */
/** @var BaseObjectNormalizer */
private $objectNormalizer;

/** @var \Symfony\Component\Serializer\SerializerInterface */
/** @var SerializerInterface */
private $serializer;

/**
Expand All @@ -55,12 +55,12 @@ class ObjectDenormalizer implements DenormalizerInterface, SerializerAwareInterf
/**
* EntityDenormalizer constructor.
*
* @param \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface|null $classMetadataFactory
* @param \Symfony\Component\Serializer\NameConverter\NameConverterInterface|null $nameConverter
* @param \Symfony\Component\PropertyAccess\PropertyAccessorInterface|null $propertyAccessor
* @param \Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface|null $propertyTypeExtractor
* @param ClassMetadataFactoryInterface|null $classMetadataFactory
* @param NameConverterInterface|null $nameConverter
* @param PropertyAccessorInterface|null $propertyAccessor
* @param PropertyTypeExtractorInterface|null $propertyTypeExtractor
*/
public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null)
public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null)
{
if (null === $propertyTypeExtractor) {
$reflectionExtractor = new ReflectionExtractor();
Expand Down

0 comments on commit 3073f76

Please sign in to comment.