Releases: DragonBe/vies
Improving validation for Spain
Further PHP 7 support and update on Czech VAT numbers
A massive "Thank You" to @nyamsprod and @krzaczek for their huge efforts making this new release of VIES possible. You both are my heroes!
This release contains the following fixes and updates:
- Improved validation on VAT checksums
- Consistency in code base
- Small performance improvements
- Improvements on unit tests to elevate quality
- New validation rule for Czech VAT numbers to include recent additions to their VAT number catalogue.
- Tested agains PHP 7.2
As you see, work continues to improve VAT validation for your projects. If you like to participate, please review our CONTRIBUTING document and as always, please report issues or feature requests on the VIES project's issue tracker.
Thank you for your support in the project!
Fix for BG VAT number validation
Fix for BG VAT number validation
Updates for CZ VAT validation
This release has updated VAT validation rules created by @krzaczek. We're very grateful for his work to make this package useful for everyone. #kudos
PHP 7.1 upgrade
All PHP 5 versions are now end-of-life, only PHP 5.6 has security updates until 31 Dec 2018. That's why I have decided to upgrade immediately to PHP 7.1 and continue to support the PHP 7 releases.
This release is developed against PHP 7.1 as it supports:
- type hinting
- return types
- visibility of constants
I believe that by upgrading VIES to PHP 7.1 we support the #gophp7 initiative.
Support for older PHP versions will be maintained until 31 Dec 2018 as 1.0.x releases.
I understand it's not always easy to upgrade, but from a security point you must update your public servers to the latest PHP version. Please look at the supported PHP versions to see when a version is announced end-of-life.
I've discussed this with other project maintainers and following the PHP version support is the best way to move forward.
Release 1.0.6
Release 1.0.5
Release notes
- pre-validation of country code and VAT number before making a request
A big thanks to @krzaczek for his contributions.
Release 1.0.4
Release notes
- Fixed country UK to GB
- Added Croatia for VAT validation
- Improved package description
A big thanks to @jamesblackwell for his contribution in this release
Including HeartBeat service checker
We love VIES service provided by the European Commission, but we also have to be realistic and acknowledge the service might not be accessible from time to time.
To help you verify if the service is up and running, I've added a HeartBeat functionality to the project that will just verify if the service is online before you start querying the service.
A typical example would be the following
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$vies = new \DragonBe\Vies\Vies();
if (false === $vies->getHeartBeat()->isAlive()) {
echo 'Service is not available at the moment, please try again later.' . PHP_EOL;
} else {
// Using my own VAT to verify, should be valid
$result = $vies->validateVat('BE', '0811231190');
echo ($result->isValid() ? 'VALID' : 'INVALID') . ' VAT number' . PHP_EOL;
// Using bogus VAT to verify, should be invalid
$result = $vies->validateVat('BE', '1234567890');
echo ($result->isValid() ? 'VALID' : 'INVALID') . ' VAT number' . PHP_EOL;
}
I hope that this HeartBeat functionality will be a small, but valuable contribution to the project.