vienthuong / shopware-php-sdk

A PHP SDK for Shopware 6 Admin API
MIT License
111 stars 43 forks source link

Deprecation Log Entries and Unmapped Attributes in MediaThumbnailEntity - shopware-php-sdk v2.0.0 Compatibility Issue #85

Open ThomasAKaestner opened 8 months ago

ThomasAKaestner commented 8 months ago

I am encountering deprecation log entries when using the latest version (v2.0.0) of the vienthuong/shopware-php-sdk with Shopware version 6.5.8.2. The issue arises specifically when making the following call: $criteria = new Criteria(); $criteria->addFilter(new EqualsFilter('productNumber', $sku)); $criteria->addAssociations(['media']); The deprecation log entries include messages like:

Deprecated: Creation of dynamic property Vin\ShopwareSdk\Data\Entity\MediaThumbnail\MediaThumbnailEntity::$path is deprecated in /var/task/vendor/vin-sw/shopware-sdk/src/Data/Entity/Entity.php on line 40 Here are more examples of the debug message: Bildschirmfoto 2024-01-24 um 10 58 40

It appears that Shopware has released additional attributes to their API, which are not properly mapped in the Vin\ShopwareSdk\Data\Entity\Media\MediaEntity. The missing attribute is not the problem here. The problem is in my opinion that it is logged as an deprecated attribute. Could we instead please ignore this attribute?

htuscher commented 2 months ago

Will be solved by https://github.com/vienthuong/shopware-php-sdk/pull/91