craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
215 stars 169 forks source link

[4.x]: Update ibericode/vat version #3497

Closed bartdigitalpulse closed 1 month ago

bartdigitalpulse commented 1 month ago

What happened?

Description

Since 2023 Belgian VAT numbers can start with 0 OR 1 instead of just 0. This is updated in version 2.0.9 of the ibericode lib. The commerce version is locked to version 1 (^1.1.2)

Steps to reproduce

  1. Newest BE vat numbers will fail authentication

Expected behavior

Allow vat numbers that start with 0 or 1. BE0... or BE1...

Actual behavior

Only numbers starting with 0 are allowed. BE0...

Craft CMS version

Craft Pro 4.9.2

Craft Commerce version

4.6.0

PHP version

8.2.18

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

-

linear[bot] commented 1 month ago

PT-1727 [4.x]: Update ibericode/vat version

lukeholder commented 1 month ago

I have a draft PR that fixes this issue, and upgrades the package, but it is a potential breaking change. Please follow discussion on the PR. Thanks.

https://github.com/craftcms/commerce/pull/3525

WHITE-developer commented 1 month ago

Would be nice if it indeed could be pushed forward as we also have some clients who are running against this issue.

lukeholder commented 1 month ago

We are going to try and get the source repo to continue releasing 1.x versions: https://github.com/ibericode/vat/pull/66

Otherwise we will look to fork the package and release our own.

The current PR I have that updates to the 2.x version of the package would be a breaking change and we wouldn't want to release that in a non major release. We are discussing this tonight as a team.

lukeholder commented 1 month ago

We were able to get the ibericode/vat repo to release 1.2.2 with the latest patterns for matching including the new Belgian VAT patterns.

For Commerce 4:

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "4.x-dev#8b05b3faa2df6d14be1c1b073497cd03626953dc as 4.6.2",
  "...": "..."
}

Then run composer update.

You should see:

 - Upgrading ibericode/vat (X.X.X => 1.2.2)

We will update this ticket once the next Craft Commerce 4.x release is out. Thanks