Smile-SA / magento2-module-store-locator

Magento 2 store locator module
50 stars 57 forks source link

use Zend\Stdlib\JsonSerializable vs Laminas\Stdlib\JsonSerializable #153

Open aurelien-andre-weldom opened 1 year ago

aurelien-andre-weldom commented 1 year ago

Smile\StoreLocator\Model\Data\RetailerTimeSlot use Zend\Stdlib\JsonSerializable without composer dependency

Preconditions

Magento Version : 2.4.4 ee (php 8.1)

Module Store Locator Version : 2.0.8

Environment : All

Steps to reproduce

  1. composer install without Zend\Stdlib\JsonSerializable
  2. bin/magento setup:di:compile

Expected result

  1. composer.json must be required "laminas/laminas-stdlib": "^3.17" OR delete methode / interface not used.

Actual result

  1. MiBPHP Fatal error: During inheritance of JsonSerializable: Uncaught Exception: Deprecated Functionality: Return type of Smile\StoreLocator\Model\Data\RetailerTimeSlot::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /src/vendor/smile/module-store-locator/Model/Data/RetailerTimeSlot.php on line 72 in /src/vendor/magento/framework/App/ErrorHandler.php:61