When using the RingCentral PHP SDK on PHP 8.1 or later, the following deprecation warnings are triggered:
PHP Deprecated: RingCentral\SDK\Http\ApiResponse::__construct(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /vendor/ringcentral/ringcentral-php/src/Http/ApiResponse.php on line 40
PHP Deprecated: RingCentral\SDK\Http\ApiResponse::__construct(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /vendor/ringcentral/ringcentral-php/src/Http/ApiResponse.php on line 40
The constructor of RingCentral\SDK\Http\ApiResponse implicitly allows $request and $response to be null, but the parameters are not declared with explicit nullable types (e.g., ?RequestInterface). As of PHP 8.1, implicit nullability is deprecated and triggers warnings.
Suggested Fix
Update the constructor signature in ApiResponse.php to explicitly declare nullable types.