Description
The below mentioned code works in php8.0
https://github.com/IntuitDeveloper/HelloWorld-PHP
With php7.4, it shows error
Notice: session_start(): A session had already been started - ignoring in /var/www/wordpress/qb-oauth/index.php on line 14
Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "QuickBooksOnline\API\Core\OAuth\OAuth2\OAuth2AccessToken" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in /var/www/wordpress/qb-oauth/index.php on line 37
which corresponds to these functions
'access_token' => $accessToken->getAccessToken(),
'refresh_token' => $accessToken->getRefreshToken(),
'x_refresh_token_expires_in' => $accessToken->getRefreshTokenExpiresAt(),
'expires_in' => $accessToken->getAccessTokenExpiresAt()
(Same folder code with hosted with PHP 8.0 localhost , it works, but with same folder and php7.4, we get above FATAL error)
Workaround: Use php8.0, remove php7.4
URL for testing