intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
246 stars 246 forks source link

PHP 8.2 Deprecated Warnings #483

Closed racerguy closed 1 year ago

racerguy commented 1 year ago

Creation of dynamic property QuickBooksOnline\API\Diagnostics\LoggerBase::$ServiceRequestLoggingLocation is deprecated in vendor/quickbooks/v3-php-sdk/src/Core/Configuration/LocalConfigReader.php on line 417.

Creation of dynamic property QuickBooksOnline\API\Data\IPPBatchItemRequest::$operationSpecified is deprecated in vendor/quickbooks/v3-php-sdk/src/DataService/Batch.php on line 230.

Creation of dynamic property QuickBooksOnline\API\Data\IPPBatchItemRequest::$operationSpecified is deprecated in vendor/quickbooks/v3-php-sdk/src/DataService/Batch.php on line 230.

marcLeeroy commented 1 year ago

Same issue when trying to get the oauth link.

Getting: Can't Config Environments from passed parameters but it's a blanket error for the actual error that is a dynamic property creation by the sdk.

It does not seem php 8.2 compatible at all.

philippe-leeroy commented 1 year ago

I've found when the exception is triggered... It's in the file LocalConfigReader.php on line 124 when the logger is setup:

LocalConfigReader::setupLogger($ippConfig, $defaultLoggingLocation, "TRUE");

The exception is : Creation of dynamic property QuickBooksOnline\API\Diagnostics\LoggerBase::$ServiceRequestLoggingLocation is deprecated

So what I would propose is simply add this in the LoggerBase.php file before the class creation:

use QuickBooksOnline\API\Core\CoreConstants; use \AllowDynamicProperties;

#[AllowDynamicProperties] class LoggerBase {

gitbjorn commented 1 year ago

We are waiting for the same fix

devbanana commented 1 year ago

Getting the same error; hoping for a fix soon.

mherbold commented 1 year ago

Same error here - what is taking so long to fix this? The fix is rather simple.

poolsimon commented 1 year ago

We are also experiencing this, @sujitharamadass any update on this?

sujitharamadass commented 1 year ago

@poolsimon We will update you soon

sujitharamadass commented 1 year ago

The fix will be released soon

sujitharamadass commented 1 year ago

Fixed in version 6.1.2