Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ApiPlatform deprecations #3674

Merged
merged 4 commits into from
Aug 14, 2023

Commits on Aug 6, 2023

  1. TranslationConstraintViolationListNormalizer: switch to getSupportedT…

    …ypes
    
    CacheableSupportsMethodInterface is deprecated.
    
    fixes:
       1x: Class "App\Serializer\Normalizer\TranslationConstraintViolationListNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    BacLuc committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    37ffb84 View commit details
    Browse the repository at this point in the history
  2. UriTemplateNormalizer: switch to getSupportedTypes

    CacheableSupportsMethodInterface is deprecated.
    
    fixes:
       1x: Class "App\Serializer\Normalizer\UriTemplateNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    
      1x: The "App\Serializer\Normalizer\UriTemplateNormalizer" class implements "Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface" that is deprecated since Symfony 6.3, implement "getSupportedTypes(?string $format)" instead.
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    BacLuc committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    f464932 View commit details
    Browse the repository at this point in the history
  3. api/Denormalizer: implement getSupportedTypes

    Because we want to call these Denormalizers only ones per request,
    we cannot cache the result of supportsDenormalization.
    
    fixes:
      1x: Class "App\Serializer\Denormalizer\InputFilterDenormalizer" should implement method "Symfony\Component\Serializer\Normalizer\DenormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    
      1x: Class "App\Serializer\Denormalizer\MaterialItemDenormalizer" should implement method "Symfony\Component\Serializer\Normalizer\DenormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    BacLuc committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    d955570 View commit details
    Browse the repository at this point in the history
  4. api/Normalizer: implement getSupportedTypes

    These Normalizers did not implement the CacheableSupportsMethodInterface
    but decorate Normalizers which might support caching the
    result of supportsNormalization.
    Because the method implementation is not yet enforced,
    we have to check if the method exists on the decorated Normalizer.
    
    fixes:
      1x: Class "App\Serializer\Normalizer\CollectionItemsNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    
      1x: Class "App\Serializer\Normalizer\ContentTypeNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    
      1x: Class "App\Serializer\Normalizer\RelatedCollectionLinkNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
        1x in CreateActivityTest::testCreateActivityIsDeniedForAnonymousUser from App\Tests\Api\Activities
    BacLuc committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    c6dca08 View commit details
    Browse the repository at this point in the history