odolbeau / phone-number-bundle

Integrates libphonenumber into your Symfony application
MIT License
217 stars 43 forks source link

fix deprecation for symfony/serializer 6.3 #148

Closed dmaicher closed 1 year ago

dmaicher commented 1 year ago

This fixes the following deprecations with Symfony 6.3:

$ vendor/bin/phpunit 
PHPUnit 9.6.8 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing 
...............................................................  63 / 156 ( 40%)
...SSS..SSSS..................W................................ 126 / 156 ( 80%)
..............................                                  156 / 156 (100%)

Time: 00:00.179, Memory: 26.00 MB

There was 1 warning:

1) Misd\PhoneNumberBundle\Tests\Validator\Constraints\PhoneNumberTest::testProperties
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

WARNINGS!
Tests: 156, Assertions: 234, Warnings: 1, Skipped: 7.

Remaining direct deprecation notices (2)

  1x: Class "Misd\PhoneNumberBundle\Serializer\Normalizer\PhoneNumberNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes(?string $format): array".
    1x in PhoneNumberNormalizerTest::testSupportNormalization from Misd\PhoneNumberBundle\Tests\Serializer\Normalizer

  1x: Class "Misd\PhoneNumberBundle\Serializer\Normalizer\PhoneNumberNormalizer" should implement method "Symfony\Component\Serializer\Normalizer\DenormalizerInterface::getSupportedTypes(?string $format): array".
    1x in PhoneNumberNormalizerTest::testSupportNormalization from Misd\PhoneNumberBundle\Tests\Serializer\Normalizer

fixes issue https://github.com/odolbeau/phone-number-bundle/issues/147