-
Notifications
You must be signed in to change notification settings - Fork 59
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
use of ::VIES_EXCLUDED_COUNTRY_CODES #143
Comments
jlsdohmen
pushed a commit
to jlsdohmen/vies
that referenced
this issue
Jan 19, 2022
…all implementations
jlsdohmen
added a commit
to jlsdohmen/vies
that referenced
this issue
Jan 19, 2022
…all implementations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As i saw you added a new const
VIES_EXCLUDED_COUNTRY_CODES
to exclude f.e. country isoGB
(currently in master, not in last release) .
This const should be used to exclude f.e.
GB
in thelistEuropeanCountries
method and other places.see https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L297
see https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L339
see https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L339
see https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L420
The IMO best way would be a new method
isEuropeanCountry(string $countryIso) : bool
.And in this new method we should return
is set at
VIES_EU_COUNTRY_LIST
and is NOT set at
VIES_EXCLUDED_COUNTRY_CODES
The exception thrown at https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L318
should be moved to https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L300
below the "Invalid country code" exception
to throw the "no longer supported" exception (which should actually be also say "invalid" IMO).
The text was updated successfully, but these errors were encountered: