outeredge / magento-structured-data-module

Magento Structured Data Module by outer/edge
MIT License
46 stars 13 forks source link

invalid api return type #76

Closed johebting closed 1 month ago

johebting commented 1 month ago

We have the following error in exception.log file after upgrading from v3.5.1 to v4.0.4 :

LogicException: The "array" class doesn't exist and the namespace must be specified. Verify and try again.

I'm pretty sure this is because array is not a valid type of return here :

https://github.com/outeredge/magento-structured-data-module/blob/master/Api/OffersRepositoryInterface.php#L9

Magento Documentation : https://developer.adobe.com/commerce/php/development/components/web-api/services/

Valid scalar types include: mixed (or anyType), bool (or boolean), str (or string), integer (or int), float, and double.

Any parameters or return values of type array can be denoted by following any of the previous types by an empty set of square brackets []

davidwindell commented 1 month ago

Hi @johebting we're not seeing this issue in the latest release, please could you try upgrading to v5.0.2?

johebting commented 1 month ago

Sorry @davidwindell, I've made a typo. Actually, I'm talking about v5.0.2.

Still the same code and return type.

https://github.com/outeredge/magento-structured-data-module/blob/5.0.2/Api/OffersRepositoryInterface.php#L9

davidwindell commented 1 month ago

@johebting this should be fixed now in v5.0.3, let us know if you still see it after upgrading.

Thanks!