XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
87 stars 64 forks source link

Undefined type 'XeroAPI\XeroPHP\Api\AccountingApi' #339

Open WongRichard1020 opened 6 months ago

WongRichard1020 commented 6 months ago

SDK you're using (please complete the following information): This is the package that I installed https://github.com/XeroAPI/xero-php-oauth2 Version 2.23.2

Describe the bug I can't use AccountingApi() even though I manually imported this above XeroAPI\XeroPHP\Api\AccountingApi. I'm using php Laravel.

To Reproduce Just type the AccountingApi class name for any IDE which provides an auto-complete feature. I'm using Visual Studio Code as my code editor.

Expected behavior Undefined type 'XeroAPI\XeroPHP\Api\AccountingApi'

Screenshots image image image

github-actions[bot] commented 6 months ago

PETOSS-380

github-actions[bot] commented 6 months ago

Thanks for raising an issue, a ticket has been created to track your request

beeradmoore commented 2 weeks ago

Found this problem while looking into why PHP memory usage jumps to 32mb when we instantiate this class.

Couldn't find a solution to my problem, but for your problem the issue is actually IDE can't load the file as it's ~3mb. This was discussed in #158. They were using PHPStorm, but I observed the same behaviour in VSCode.

EDIT: #292 discusses it in VSCode.