Fix phonenumber -> telephone for thirdparty

This commit is contained in:
2022-03-04 16:27:53 +01:00
parent e9236875d2
commit e32b8b0942
6 changed files with 23 additions and 17 deletions

View File

@@ -40,6 +40,10 @@ class PhonenumberNormalizer implements NormalizerInterface, DenormalizerInterfac
*/
public function denormalize($data, $type, $format = null, array $context = [])
{
if ("" == trim($data)) {
return null;
}
try {
return $this->phoneNumberUtil->parse($data, $this->defaultCarrierCode);
} catch (NumberParseException $e) {