Skip to content

Add compatability with php8.4 #540

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["api", "http", "rest", "quickbooks", "smallbusiness"],
"homepage": "http://developer.intuit.com",
"require": {
"php": ">=5.6.0",
"php": ">=7.2.5",
"ext-mbstring": "*",
"ext-dom": "*",
"guzzlehttp/guzzle": "^7.9"
Expand Down
4 changes: 2 additions & 2 deletions src/Core/HttpClients/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class CurlHttpClient implements HttpClientInterface{

/**
* The constructor for constructing the cURL http client for making API calls
* @param BaseCurl $curl A predefined BaseCurl instance to be used in this client
* @param BaseCurl|null $curl A predefined BaseCurl instance to be used in this client
*/
public function __construct(BaseCurl $curl = null)
public function __construct(?BaseCurl $curl = null)
{
if(isset($curl)){
$this->basecURL = $curl;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/HttpClients/GuzzleHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class GuzzleHttpClient implements HttpClientInterface

/**
* Constructor for GuzzleHttpClient
* @param Client guzzleClient passed to the constructor
* @param Client|null guzzleClient passed to the constructor
*/
public function __construct(Client $guzzleClient = null){
public function __construct(?Client $guzzleClient = null){
if(isset($guzzleClient)){
$this->guzzleClient = $guzzleClient;
}else{
Expand Down
4 changes: 2 additions & 2 deletions src/Core/HttpClients/SyncRestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class SyncRestHandler extends RestHandler
* Initializes a new instance of the SyncRestHandler class.
*
* @param ServiceContext $context The service context used for the request
* @param HttpClientInterface $client The http client used for the request
* @param HttpClientInterface|null $client The http client used for the request
*/
public function __construct($context, HttpClientInterface $client = null)
public function __construct($context, ?HttpClientInterface $client = null)
{
parent::__construct($context);
$this->context = $context;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/OAuth/OAuth1/OAuth1.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ private function setOAuthTimeStamp(){

/**
* Add all OAuth query paraemters to the signature string string
* @param Array $queryParameters The queryParameters to be included
* @return Array $queryParameters The complete query parameters
* @param array|null $queryParameters The queryParameters to be included
* @return array $queryParameters The complete query parameters
*/
private function appendOAuthPartsTo(array $queryParameters = null){
private function appendOAuthPartsTo(?array $queryParameters = null){
if($queryParameters == null){
$queryParameters = array();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Core/OAuth/OAuth2/OAuth2LoginHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ class OAuth2LoginHelper
* @param String $redirectUri The redirect URI specified for the App
* @param String $scope The scope of the app
* @param String $state The string to verify the request is not compromised
* @param ServiceContext $serviceContext The serviceContext for the request, only passed for making refresh token API call
* @param ServiceContext|null $serviceContext The serviceContext for the request, only passed for making refresh token API call
*/
public function __construct($clientID, $clientSecret, $redirectUri = null, $scope = null, $state = null, ServiceContext $serviceContext = null){
public function __construct($clientID, $clientSecret, $redirectUri = null, $scope = null, $state = null, ?ServiceContext $serviceContext = null){
//used for refresh token
if(isset($serviceContext)){
$accessTokenObj = $serviceContext->requestValidator;
Expand Down
4 changes: 2 additions & 2 deletions src/XSD2PHP/lib/ZF/1.10.7/Zend/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class Zend_Exception extends Exception
*
* @param string $msg
* @param int $code
* @param Exception $previous
* @param Exception|null $previous
* @return void
*/
public function __construct($msg = '', $code = 0, Exception $previous = null)
public function __construct($msg = '', $code = 0, ?Exception $previous = null)
{
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
parent::__construct($msg, (int) $code);
Expand Down
8 changes: 4 additions & 4 deletions src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ class Zend_Soap_Server implements Zend_Server_Interface
* options are specified, they are passed on to {@link setOptions()}.
*
* @param string $wsdl
* @param array $options
* @param array|null $options
* @return void
*/
public function __construct($wsdl = null, array $options = null)
public function __construct($wsdl = null, ?array $options = null)
{
if (!extension_loaded('soap')) {
require_once 'Zend/Soap/Server/Exception.php';
Expand Down Expand Up @@ -948,11 +948,11 @@ public function fault($fault = null, $code = "Receiver")
* @param string $errstr
* @param string $errfile
* @param int $errline
* @param array $errcontext
* @param array|null $errcontext
* @return void
* @throws SoapFault
*/
public function handlePhpErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null)
public function handlePhpErrors($errno, $errstr, $errfile = null, $errline = null, ?array $errcontext = null)
{
throw $this->fault($errstr, "Receiver");
}
Expand Down