Closed menno-ll closed 1 year ago
When can we expect a fix?
deprecation warning is just triggered if using version 1.8.2
php version 8.x strict mode
public static function iban($iban)
{
$out = true;
$iban = new Iban($iban);
$validator = new IbanValidator();
if(!$validator->validate($iban)){
$out = 'Diese Iban ist ungültig.';
}
return $out;
}
PHP Deprecated: Not implementing the "Iban\Validation\Swift\RegistryLoaderInterface" for argument "$registryLoader" is deprecated since 1.8.1. in /var/www/html/vendor/jschaedl/iban-validation/src/Swift/Registry.php on line 36
composer.lock entry:
"name": "jschaedl/iban-validation",
"version": "v1.8.2",
"source": {
"type": "git",
"url": "https://github.com/jschaedl/iban-validation.git",
"reference": "8b635c4872ff8818e8e9325058092c5add8defcd"
}
This fix wasn't released until now. But here you go: https://github.com/jschaedl/iban-validation/releases/tag/v1.8.3
Closing here now. Thanks for reporting this.
When using this library, i get the following deprecation:
However, this is caused by the internal functions of this library, because they pass nothing to the
Iban\Validation\Swift\Registry::__construct()
function. That falls back tonull
, which results in the deprecation beeing triggered.This can easily be resolved by adding an
! is_null()
check to the if statement that checks for the deprecation