5.11 release: PHP Fatal error: Declaration of SocialiteProviders\Okta\Provider::getRefreshTokenResponse(string $refreshToken) must be compatible with Laravel\Socialite\Two\AbstractProvider::getRefreshTokenResponse($refreshToken)
johanehnberg opened this issue · comments
Johan Ehnberg commented
Socialite Version
5.11
Laravel Version
10.35.0
PHP Version
8.1
Database Driver & Version
MySQL
Description
Looks like the new release may introduce some issues. 5.10 worked fine while 5.11 throws this in composer:
PHP Fatal error: Declaration of SocialiteProviders\Okta\Provider::getRefreshTokenResponse(string $refreshToken) must be compatible with Laravel\Socialite\Two\AbstractProvider::getRefreshTokenResponse($refreshToken) in www/vendor/socialiteproviders/okta/Provider.php on line 132
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of SocialiteProviders\Okta\Provider::getRefreshTokenResponse(string $refreshToken) must be compatible with Laravel\Socialite\Two\AbstractProvider::getRefreshTokenResponse($refreshToken)
at vendor/socialiteproviders/okta/Provider.php:132
128▕ * @param string $refreshToken
129▕ *
130▕ * @return array
131▕ */
➜ 132▕ public function getRefreshTokenResponse(string $refreshToken)
133▕ {
134▕ $response = $this->getHttpClient()->post($this->getTokenUrl(), [
135▕ RequestOptions::AUTH => [$this->clientId, $this->clientSecret],
136▕ RequestOptions::HEADERS => ['Cache-Control' => 'no-cache'],
Whoops\Exception\ErrorException
Declaration of SocialiteProviders\Okta\Provider::getRefreshTokenResponse(string $refreshToken) must be compatible with Laravel\Socialite\Two\AbstractProvider::getRefreshTokenResponse($refreshToken)
at vendor/socialiteproviders/okta/Provider.php:132
128▕ * @param string $refreshToken
129▕ *
130▕ * @return array
131▕ */
➜ 132▕ public function getRefreshTokenResponse(string $refreshToken)
133▕ {
134▕ $response = $this->getHttpClient()->post($this->getTokenUrl(), [
135▕ RequestOptions::AUTH => [$this->clientId, $this->clientSecret],
136▕ RequestOptions::HEADERS => ['Cache-Control' => 'no-cache'],
+1 vendor frames
2 [internal]:0
Whoops\Run::handleShutdown()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Steps To Reproduce
composer upgrade
Mior Muhammad Zaki commented
The package needs to be updated to be compatible with 5.11 release: #675
Please submit the bug report to https://github.com/SocialiteProviders/Providers project