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

Implicit conversion of keys from strings is deprecated. #2

Closed
tsaiyihua opened this issue Dec 11, 2020 · 5 comments
Closed

Implicit conversion of keys from strings is deprecated. #2

tsaiyihua opened this issue Dec 11, 2020 · 5 comments

Comments

@tsaiyihua
Copy link

Hi,

I got the error while getting access token from apple.
Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.

I find it cause by the problem from lcobucci/jwt 3.4.* , so I use "lcobucci/jwt": "3.3.*" in my project and it work perfectly.

The latest version of lcobucci/jwt is 4.1.x, but not released, I hasn't test it too.

@hywak
Copy link
Collaborator

hywak commented Dec 11, 2020

Hey @tsaiyihua,
Thanks for creating an issue.

Could you please provide full stack trace?

@tsaiyihua
Copy link
Author

No, It just give me the error message.

In the code, it use trigger_errors with E_USER_DEPRECATED

lcobucci/jwt 3.4.2

file vendor/lcobucci/jwt/src/Signer/BaseSigner.php
line 49 - 63

    /**
     * @param Key|string $key
     *
     * @return Key
     */
    private function getKey($key)
    {
        if (is_string($key)) {
            trigger_error('Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.', E_USER_DEPRECATED);

            $key = new Key($key);
        }

        return $key;
    }

@hywak
Copy link
Collaborator

hywak commented Dec 11, 2020

I have done a quick fix for that setting lcobucci/jwt an explicit version 3.3.3.. Proper fix requires updating lcobucci/jwt version to 4.x.

Please tell me if that works for you, I will close the issue then.
https://github.com/AzimoLabs/apple-sign-in-php-sdk/releases/tag/1.2.0

@tsaiyihua
Copy link
Author

I have done a quick fix for that setting lcobucci/jwt an explicit version 3.3.3.. Proper fix requires updating lcobucci/jwt version to 4.x.

Please tell me if that works for you, I will close the issue then.
https://github.com/AzimoLabs/apple-sign-in-php-sdk/releases/tag/1.2.0

Yes, it works for me at 1.2.0, thanks a lot :)

@hywak hywak closed this as completed Dec 11, 2020
@hywak
Copy link
Collaborator

hywak commented Dec 11, 2020

You are welcome, thanks for raising the issue.

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

2 participants