readdle / app-store-server-api

Pure PHP library that allows managing customer transactions using the App Store Server API and handling server-to-server notifications using the App Store Server Notifications V2
MIT License
54 stars 20 forks source link

Property accessed before initialization #26

Closed javiermarinros closed 1 month ago

javiermarinros commented 1 month ago

I am getting this error when using sendConsumptionInformation in v3.10.1:

Error: Typed property Readdle\AppStoreServerAPI\RequestBody\ConsumptionRequestBody::$refundPreference must not be accessed before initialization

Located at vendor/readdle/app-store-server-api/src/Request/AbstractRequestParamsBag.php:173

I hope this info helps.

Thank you!

pkotets commented 1 month ago

Hi,

Thanks a lot for this report. Indeed, the bug was introduced while new parameter was being added to this request.

I've just released v3.10.2 which addresses this issue, let me know if it works for you.

javiermarinros commented 1 month ago

That was quick! Thank you! I will let you know if the issue arises again.

pkotets commented 1 month ago

Closing the issue for now. Feel free to reopen if anything else is needed.