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

Hybridauth\User\Profile::$identifier typed as int|null but string given #1375

Open
KevsRepos opened this issue Jun 23, 2023 · 1 comment
Open

Comments

@KevsRepos
Copy link

Bug, feature or question?

Is this a bug, a feature request or a question?
Give us a short description.

The property Hybridauth\User\Profile::$identifier is typed with phpdoc as int|null but the actual returned value is a string. This gets in trouble with php linters.

Version and provider

What version of Hybrid Auth does this relates to?
3.8

Is this an issue with a provider? If yes, which one?
Found this while working with the google provider only.

Reproduction

How can we replicate this issue?

$hybridauth = new Hybridauth($config);

$adapter = $hybridauth->authenticate($providerName);

$userProfile = $adapter->getUserProfile();

$userProfile->identifier; // will return string
@ApacheEx
Copy link
Member

good catch. I think we can try to extend the type for this field. So, at then end it will be string|int|null

PR is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants