Skip to content

Commit 5d9722f

Browse files
Merge pull request #270 from MultiSafepay/PLGLTS-358-phone-number-filter-issue
PLGLTS-358 Removing the Phone number filter since it remove a valid + sign
2 parents b28f728 + 79ad9e6 commit 5d9722f

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [5.1.1] - 2021-07-13
10+
### Changed
11+
- Removal of phone number filtering in PhoneNumber value object.
12+
913
## [5.1.0] - 2021-06-01
1014
### Changed
1115
- Deprecation of duplicate method TransactionResponse->getPaymentLink().

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "MultiSafepay PHP SDK",
44
"type": "library",
55
"license": "MIT",
6-
"version": "5.1.0",
6+
"version": "5.1.1",
77
"require": {
88
"php": "^7.2|^8.0",
99
"ext-json": "*",

src/Util/Version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class Version
1919
{
20-
const SDK_VERSION = '5.1.0';
20+
const SDK_VERSION = '5.1.1';
2121

2222
/**
2323
* @var Version

src/ValueObject/Customer/PhoneNumber.php

+2-11
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ class PhoneNumber
1515
/**
1616
* @var string
1717
*/
18-
private $phoneNumber = '';
18+
private $phoneNumber;
1919

2020
/**
2121
* Country constructor.
2222
* @param string $phoneNumber
2323
*/
2424
public function __construct(string $phoneNumber)
2525
{
26-
$this->phoneNumber = $this->filter($phoneNumber);
26+
$this->phoneNumber = $phoneNumber;
2727
}
2828

2929
/**
@@ -33,13 +33,4 @@ public function get(): string
3333
{
3434
return $this->phoneNumber;
3535
}
36-
37-
/**
38-
* @param string $phoneNumber
39-
* @return string
40-
*/
41-
private function filter(string $phoneNumber): string
42-
{
43-
return preg_replace('/([^0-9]+)/', '', $phoneNumber);
44-
}
4536
}

0 commit comments

Comments
 (0)