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

Deprecation error when nothing is passed as an argument to Iban\Validation\Swift\Registry::__construct() function #75

Closed
menno-ll opened this issue Mar 17, 2022 · 4 comments

Comments

@menno-ll
Copy link

When using this library, i get the following deprecation:

Not implementing the "Iban\Validation\Swift\RegistryLoaderInterface" for argument "$registryLoader" is deprecated since 1.8.1.

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 to null, 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

@hbr-t
Copy link

hbr-t commented Jun 1, 2022

When can we expect a fix?

@ElTi42
Copy link

ElTi42 commented Dec 5, 2022

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"
            }

@jschaedl
Copy link
Owner

jschaedl commented Dec 9, 2022

This fix wasn't released until now. But here you go: https://github.com/jschaedl/iban-validation/releases/tag/v1.8.3

@jschaedl
Copy link
Owner

jschaedl commented Dec 9, 2022

Closing here now. Thanks for reporting this.

@jschaedl jschaedl closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants