Closed phh closed 7 months ago
In #80, the expected closure in setCreateUserCallback() was changed from:
setCreateUserCallback()
@param \Closure(\Laravel\Socialite\Contracts\User $oauthUser, self $socialite): \Illuminate\Contracts\Auth\Authenticatable $callback
to: @param \Closure(string $provider, \Laravel\Socialite\Contracts\User $oauthUser, self $socialite): \Illuminate\Contracts\Auth\Authenticatable $callback
@param \Closure(string $provider, \Laravel\Socialite\Contracts\User $oauthUser, self $socialite): \Illuminate\Contracts\Auth\Authenticatable $callback
See https://github.com/DutchCodingCompany/filament-socialite/pull/80/files#diff-67b15d15cdb909bec4aa64726a764f56356dafdff7ded1b3c6d5cfbfbc10a15cR143
meaning that is expects a string $provider. It can work without, however, PHPStan is nagging about it, due to it not being provided in the example.
string $provider
Error:
Parameter #1 $callback of static method DutchCodingCompany\FilamentSocialite\FilamentSocialite::setCreateUserCallback() expects (Closure(string, Laravel\Socialite\Contracts\User, DutchCodingCompany\FilamentSocialite\FilamentSocialite): Illuminate\Contracts\Auth\Authenticatable)|null, Closure(Laravel\Socialite\Contracts\User, DutchCodingCompany\FilamentSocialite\FilamentSocialite): mixed given.
This PR updated the example.
Thanks!
In #80, the expected closure in
setCreateUserCallback()
was changed from:@param \Closure(\Laravel\Socialite\Contracts\User $oauthUser, self $socialite): \Illuminate\Contracts\Auth\Authenticatable $callback
to:
@param \Closure(string $provider, \Laravel\Socialite\Contracts\User $oauthUser, self $socialite): \Illuminate\Contracts\Auth\Authenticatable $callback
See https://github.com/DutchCodingCompany/filament-socialite/pull/80/files#diff-67b15d15cdb909bec4aa64726a764f56356dafdff7ded1b3c6d5cfbfbc10a15cR143
meaning that is expects a
string $provider
. It can work without, however, PHPStan is nagging about it, due to it not being provided in the example.Error:
This PR updated the example.