diff --git a/CHANGELOG.md b/CHANGELOG.md index a0612475a..503e7af17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ and this project adheres to ## Unreleased + + +## Test releases + +### test release 2022-01-12 + +* fix thirdparty normalizer on telephone field: https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/322 + +### test release 2022-01-11 + * vuejs: translate in French all multiselect widgets * [address] define address lines according postal standards for France and Belgium (default) and change AddressRender, chill_entity_render_box and AddressRenderBox.vue * [household] change translations (champs-libres/departement-de-la-vendee/accent-suivi-developpement#109) @@ -44,8 +54,6 @@ and this project adheres to * List notifications, show, and comment in User section * Notify button and contextual notification box on associated objects pages -## Test releases - ### test release 2021-12-14 * [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262) diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index a6f9a5c26..7c3e9f60a 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -221,7 +221,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface * message="Invalid phone number: it should begin with the international prefix starting with ""+"", hold only digits and be smaller than 20 characters. Ex: +33123456789" * ) * @PhonenumberConstraint(type="any") - * @Groups({"read", "write", "dogen:read", "docgen:read:3party:parent"}) + * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) */ private ?string $telephone = null; @@ -464,10 +464,8 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface /** * Get telephone. - * - * @return string|null */ - public function getTelephone() + public function getTelephone(): ?string { return $this->telephone; } diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php index 66dace3b6..48a3ab8dd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php +++ b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php @@ -91,11 +91,14 @@ final class ThirdPartyDocGenNormalizerTest extends KernelTestCase ->setName('test') ->setCivility((new Civility())->setName(['fr' => 'Monsieur'])->setAbbreviation(['fr' => 'M.'])) ->setEmail('info@cl.coop') + ->setTelephone('+32486123456') ->addTypesAndCategories('kind') ->addTypesAndCategories((new ThirdPartyCategory())->setName(['fr' => 'category'])); $actual = $this->normalizer->normalize($thirdparty, 'docgen', ['groups' => ['docgen:read']]); $this->assertIsArray($actual); + $this->assertArrayHasKey('telephone', $actual); + $this->assertEquals('+32486123456', $actual['telephone']); } }