Skip to content

Releases: spaze/vat-calculator

End of support

28 Nov 01:30
6b6aada
Compare
Choose a tag to compare

(This is the same release notes as in 4.0.4 but in 3.6.x series which still seems to be used by some folks even after almost a year after I've EOL'd this.)

I'm no longer using the library, have migrated to Stripe Checkout and Stripe Tax and moved on and as such

I will no longer maintain the library.

I'm not sure what would be the best way to do this but I just didn't want to abandon it like that so I'm making this a new major release so there's a chance you'll read this :-) Otherwise there are no (real) changes. This repository will be available at least until end of 2023 but

there will be no new releases.

This version will start throwing notices which will be upgraded to warnings in January 2024 because some rates may change and it may be dangerous pricing-wise to use this library.

Going forward there are 2 options for you:

  1. Let me know if you want to maintain the library, I'll transfer the repo See 2.
  2. Move back to https://github.com/driesvints/vat-calculator by @driesvints (recommended)
  3. Use https://github.com/JakubJachym/vat-calculator by @JakubJachym (recommended if you want features from this fork which the original doesn't have)

Thank you 🙏

End of support

18 Jan 07:42
9bd94f3
Compare
Choose a tag to compare

I'm no longer using the library, have migrated to Stripe Checkout and Stripe Tax and moved on and as such

I will no longer maintain the library.

I'm not sure what would be the best way to do this but I just didn't want to abandon it like that so I'm making this a new major release so there's a chance you'll read this :-) Otherwise there are no (real) changes. This repository will be available at least until end of 2023 but

there will be no new releases.

This version will start throwing notices which will be upgraded to warnings in January 2024 because some rates may change and it may be dangerous pricing-wise to use this library.

Going forward there are 2 options for you:

  1. Let me know if you want to maintain the library, I'll transfer the repo See 2.
  2. Move back to https://github.com/driesvints/vat-calculator by @driesvints (recommended)
  3. Use https://github.com/JakubJachym/vat-calculator by @JakubJachym (recommended if you want features from this fork which the original doesn't have)

Thank you 🙏

What's Changed

  • Start testing on PHP 8.2 (#39)

Full Changelog: v3.6.5...v4.0.4

Timeout

26 Jul 02:15
727295a
Compare
Choose a tag to compare

You can now specify a timeout for online VAT number check using VIES, in VatCalculator::__construct's float $timeout parameter. If not specified, PHP's default_socket_timeout is used which defaults to 60 seconds.

Campione d'Italia: correct VAT and postal code

11 Jan 02:32
f35e78b
Compare
Choose a tag to compare

Campione d'Italia became part of the EU customs territory on 1 Jan 2020.

That means two relevant changes:

  1. VAT will apply, but the tax rate will remain that of Switzerland (#35)
  2. The Swiss postal code ceased to be valid (#34)

This release also:

  • Fixes IT postal codes for Livigno & again Campione d'Italia (#32)
  • Requires updated testing tools (#28) and run tests on PHP 8.1 (#32) which means it's now officially supported

Remove GB from EU countries

04 Jan 23:14
f478a23
Compare
Choose a tag to compare

Removes GB from EU countries, because VIES validation now throws errors. You can added GB back manually with addRateForCountry() if you want to calculate VAT but tax id validation won't be done using the VIES service.

PHP 8 support

26 Nov 01:06
bb9c66e
Compare
Choose a tag to compare

PHP 8.0 is now supported.

No other user-facing changes in this release.

Get all known rates

30 Oct 04:41
6a0adbc
Compare
Choose a tag to compare
  • New method VatRates::getAllKnownRates() to get all known rates for a country
  • Can specify $businessCountryCode and $businessVatNumber in VatCalculator's constructor, no need to call setBusinessCountryCode() or setBusinessVatNumber()

throw new InvalidCharsInVatNumberException;

25 Sep 16:52
Compare
Choose a tag to compare

This release adds a new exception when you pass invalid characters for VAT number validation. Previously, such VAT number was sent for validation but came back as invalid.

  • InvalidCharsInVatNumberException thrown when the VAT number to be validated contains invalid (e.g. non-latin) characters, use $e->getInvalidChars() to get the chars and their offset as array (#20)
  • Abstract base exception class VatNumberException for VAT number-related failures
  • Move phpstan/phpstan to dev dependencies only, it's not required for or by the lib itself
  • Auto code checking with linter, code sniffer (#18)

https://UnsupportedCountryException

11 Sep 13:30
Compare
Choose a tag to compare
  • When trying to get details of a VAT id from a non-EU country (getVatDetails() or , UnsupportedCountryException is now thrown, previously VatCheckUnavailableException was thrown (#13)
  • VIES WSDL is now loaded over HTTPS, the server was issuing a redirect to HTTPS anyway (#15)
  • New method shouldCollectEuVat() that returns true only for EU member states, shouldCollectVat() also returns true for countries added manually with addRateForCountry() (#13 again)

More non-EU countries removed

07 Sep 14:16
299a054
Compare
Choose a tag to compare

Some countries that are not part of the EU also use VAT. But if you're in EU, you don't always want to charge VAT when selling to such countries so these countries have been removed from the default config. You can add TR and CH back with VatRates::addRateForCountry(). This is similar to Norway, that has been removed in release 3.1.0. (#11)

Static analysis using the wonderful PHPStan (#12).