Skip to content
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

Remove support for the United Kingdom ("GB") #126

Closed
jonathanmaron opened this issue Jan 5, 2021 · 16 comments
Closed

Remove support for the United Kingdom ("GB") #126

jonathanmaron opened this issue Jan 5, 2021 · 16 comments

Comments

@jonathanmaron
Copy link
Contributor

On 31 December 2020, the transition period for the United Kingdom's withdrawal from the EU ended. This means that the UK is now formally a third country and EU law no longer applies there.

For the purposes of customs, the UK is treated as any other non-EU country as of 1 January 2021. In particular, customs procedures and formalities now apply to trade between the UK and the EU.

Source: https://ec.europa.eu/taxation_customs/uk_withdrawal_en

We therefore should remove support for the United Kingdom.

@DragonBe
Copy link
Owner

DragonBe commented Jan 5, 2021

As mentioned in #127 I would like to implement the Nothern Ireland structures first before removing the UK completely from this library.

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

Question: is removing support of the UK a BC break for which I need to release a new major version 3.0.0, or do I accept it as normal progression and tag it as a 2.2.0 or a 2.1.15 release?

@jonathanmaron
Copy link
Contributor Author

jonathanmaron commented Jan 6, 2021

Since we are removing a class, that is absolutely a breaking change and requires a new major version.

Increment the [..] MAJOR version when you make incompatible API changes.

Source: https://semver.org/

Removing a class is an "incompatible API change".

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

@jonathanmaron that's exactly what I was thinking too, but bear with me when I play devil's advocate.

Keeping UK in the current code base can be considered a bug since Brexit and has to be fixed. The validation routines are not impacted nor is there a change in API signatures, the only thing that happens is a removal of a configuration that now allows validation of Brittish VAT ID's and with them helper classes that allow the validation to be executed.

In the above thinking the change looks more like a bugfix rather than a BC breaking version.

If I tag this as version a new major release, people who are using the older version are still validating UK VAT ID's locally, but fail validation at the EC VIES service which is not a desired feature. This is where I'm stuck.

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

@michaelcullum
Copy link

I'd say it's major, as VAT is still applicable inside the UK same as before (if you're a UK entity using this would be a significant breaking change), and VAT is still to be paid on products purchased & being imported to the UK from the EU.

I'd say the ideal would be introducing an extra option that would make the UK fail, thereby giving users the option for if they see it as a bug for their use-case, they can implement a change as appropriate, but does not introduce a BC break for people expecting current behaviour.

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

Instead of removing support for the UK, we could continue to support all users there by providing an additional call to the service provided by Gov.uk as suggested by Derick. This service is still in beta though.

@cooperaj
Copy link

cooperaj commented Jan 6, 2021

I work for a gov agency with public facing sites. Beta may mean changes in the future but (by our standards at least) would mean the service is here to stay.

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

@cooperaj Do you also know how long it takes before a "beta" state becomes stable with the UK.gov services (on average)?

@cooperaj
Copy link

cooperaj commented Jan 6, 2021

@DragonBe Unsure unfortunately. My current project has been public beta for 4 months so somewhere between that and perpetual a web 2.0 forever. The api linked by Derick has been around in some form or other since January 2018.

EDIT. My bad. I was looking at a different API. Ha... I don't know when this one was made.

@DragonBe
Copy link
Owner

DragonBe commented Jan 6, 2021

No worries @cooperaj, I will need to fully investigate if and how I can integrate this service.

@jonathanmaron
Copy link
Contributor Author

jonathanmaron commented Jan 7, 2021

The original scope of DragonBe\Vies\Vies is defined as:

Component using the European Commission (EC) VAT Information Exchange System (VIES) to verify and validate VAT registration numbers in the EU, using PHP and Composer.

Since the VIES web service no longer provides validation for the United Kingdom, I do not think that we should support validation for the United Kingdom in the component.

Why should the United Kingdom be treated differently from all other non-EU countries that have VAT numbers? There are many. See the second and third tables at: https://en.wikipedia.org/wiki/VAT_identification_number

I think a far more elegant and scalable solution would be to provide a new component with the same API as DragonBe\Vies\Vies that offers validation for non-EU countries.

This would allow developers to create their own validation components that cherry pick the validation routines that they need for their application.

@DragonBe
Copy link
Owner

As I'm investigating options for the UK, I should really think about a more modular approach for this package where non-European validation services could be added as an external plugin maintained by others rather than it is build-in.

In regards to the whole UK issue, I don't want to remove the logic just yet except I won't submit the request against the EC VIES service any longer as there it will be marked as invalid. I could inform users the structure is valid but validation requires an additional step with a pointer to https://www.tax.service.gov.uk/check-vat-number/enter-vat-details. Would this work?

DragonBe added a commit that referenced this issue Jan 12, 2021
Issue #126: Instead of removing UK validation all together I now trigger a ViesServiceException to inform users can no longer validate VAT ID's from the United Kingdom. I believe this is an elegant transition rather than completely remove the validation for GB, because it is still possible to use the checksum validator.
@DragonBe
Copy link
Owner

@jonathanmaron I know this is not a solution to still provide VAT validation services for UK VAT ID's, but have a look at #132 as I believe this is an elegant transition for the time being.

@Freeaqingme
Copy link

I think the fact that Vies::listEuropeanCountries() still returns 'GB' should be considered a bug as of this year. The rest, I'm not sure.

DragonBe added a commit that referenced this issue Apr 3, 2021
Solving issue #132 in regards to issue #126 about Brexit of UK
@DragonBe
Copy link
Owner

DragonBe commented Apr 3, 2021

I think it's safe to now make the UK validation a failure as solved in 03231df

@DragonBe DragonBe closed this as completed Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants