Skip to content

Commit

Permalink
upgrade to symfony 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
paullla committed Jun 27, 2023
1 parent 6e1e8bf commit f265123
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
"doctrine/doctrine-bundle": "^2.8",
"doctrine/orm": "^2.14",
"elasticsearch/elasticsearch": "^7.1",
"symfony/dotenv": "6.2.*",
"symfony/expression-language": "6.2.*",
"symfony/framework-bundle": "^6.2",
"symfony/messenger": "6.2.*",
"symfony/property-info": "6.2.*",
"symfony/runtime": "6.2.*",
"symfony/serializer": "6.2.*",
"symfony/validator": "6.2.*",
"symfony/yaml": "6.2.*",
"symfony/dotenv": "6.3.*",
"symfony/expression-language": "6.3.*",
"symfony/framework-bundle": "^6.3",
"symfony/messenger": "6.3.*",
"symfony/property-info": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/serializer": "6.3.*",
"symfony/validator": "6.3.*",
"symfony/yaml": "6.3.*",
"ext-simplexml": "*",
"symfony/security-bundle": "^6.2",
"symfony/finder": "^6.2"
"symfony/security-bundle": "^6.3",
"symfony/finder": "^6.3"
},
"require-dev": {
"symfony/browser-kit": "6.2.*",
"symfony/css-selector": "6.2.*",
"symfony/console": "6.2.*",
"symfony/phpunit-bridge": "^6.2",
"symfony/browser-kit": "6.3.*",
"symfony/css-selector": "6.3.*",
"symfony/console": "6.3.*",
"symfony/phpunit-bridge": "^6.3",
"phpunit/phpunit": "^10.1"
},
"prefer-stable": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function __construct(private readonly LoggableContextCollectionFactoryInt
*/
public function create(): LoggableContextCollection
{
return $this->cache->get(self::CACHE_KEY, fn() => $this->decorated->create());
return $this->cache->get(self::CACHE_KEY, fn () => $this->decorated->create());
}
}
9 changes: 4 additions & 5 deletions src/Serializer/ActivityLogCollectionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Doctrine\Common\Collections\Collection;
use Locastic\Loggastic\Identifier\LogIdentifierExtractorInterface;
use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

// Use identifier as collection index
Expand All @@ -29,13 +28,13 @@ public function normalize($object, string $format = null, array $context = []):
return $data;
}

public function supportsNormalization($data, string $format = null): bool
public function getSupportedTypes(?string $format): array
{
return $data instanceof Collection && self::FORMAT === $format;
return $this->decorated->getSupportedTypes($format);
}

public function hasCacheableSupportsMethod(): bool
public function supportsNormalization($data, string $format = null): bool
{
return $this->decorated instanceof CacheableSupportsMethodInterface && $this->decorated->hasCacheableSupportsMethod();
return $data instanceof Collection && self::FORMAT === $format;
}
}
3 changes: 1 addition & 2 deletions src/Serializer/ActivityLogCollectionNormalizerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Locastic\Loggastic\Serializer;

use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

interface ActivityLogCollectionNormalizerInterface extends NormalizerInterface, CacheableSupportsMethodInterface
interface ActivityLogCollectionNormalizerInterface extends NormalizerInterface
{
}

0 comments on commit f265123

Please sign in to comment.