QuickBooks-V3-PHP-SDK icon indicating copy to clipboard operation
QuickBooks-V3-PHP-SDK copied to clipboard

responseSerializer->Deserialize gives Undefined array key var

Open patricksebastien opened this issue 9 months ago • 1 comments

I am having an issue with Query exchangerate objects

PHP 8.2 - quickbooks/v3-php-sdk v6.1.2

When trying to query: select * from exchangerate where sourcecurrencycode in ('EUR', 'INR') and asofdate='2023-07-07'

The DataService output this (GOOD): $tmpXML = $responseXmlObj->QueryResponse->asXML();

<QueryResponse startPosition="1" maxResults="2" totalCount="2"><ExchangeRate><MetaData><LastUpdatedTime>2023-07-07T21:02:56-07:00</LastUpdatedTime></MetaData><SourceCurrencyCode>INR</SourceCurrencyCode><TargetCurrencyCode>CAD</TargetCurrencyCode><Rate>0.016149</Rate><AsOfDate>2023-07-07</AsOfDate></ExchangeRate><ExchangeRate><MetaData><LastUpdatedTime>2023-07-07T21:02:56-07:00</LastUpdatedTime></MetaData><SourceCurrencyCode>EUR</SourceCurrencyCode><TargetCurrencyCode>CAD</TargetCurrencyCode><Rate>1.4558</Rate><AsOfDate>2023-07-07</AsOfDate></ExchangeRate></QueryResponse>

BUT the Deserialize code right after is giving me an error Undefined array key var $parsedResponseBody = $this->responseSerializer->Deserialize($tmpXML, false);

File causing the issue is Bind.php:138: vendor/quickbooks/v3-php-sdk/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php:138

I am drilling down the issue to this piece of code which output false: $propertyDocs = $refl->getProperty($name)->getDocComment();

And there's goes 2 hours of my life for an undocumented installation information, solution is to set: opcache.save-comments = 1

Please update the doc: image

patricksebastien avatar Oct 18 '23 22:10 patricksebastien