myparcelnl / prestashop

PrestaShop module to integrate with MyParcel NL and BE
https://developer.myparcel.nl/nl/documentatie/11.prestashop.html
10 stars 5 forks source link

Error 500 when opening configuration page on PHP 8.0 or 8.1 #205

Closed RedFuseCap closed 1 year ago

RedFuseCap commented 1 year ago

Module version

1.7.2

PrestaShop version

8.0.0

PHP version

8.1

What went wrong?

The server is returning an 500 Internal Server Error when opening the configuration page of the MyParcel module.

Reproduction steps

  1. Install a fresh PrestaShop v8.0.0 store on a webserver with PHP 8.1 active.
  2. Install the MyParcelNL v1.7.2 plugin in Module Manager
  3. Click on "Configure"

Relevant log output

TypeError:
method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given

  at modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php:1715
  at method_exists()
     (modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php:1715)
  at MyParcelNL\Sdk\src\Support\Collection::MyParcelNL\Sdk\src\Support\{closure}()
  at array_map()
     (modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php:1719)
  at MyParcelNL\Sdk\src\Support\Collection->toArray()
     (modules/myparcelnl/src/Module/Configuration/SettingsMenu.php:56)
  at Gett\MyparcelNL\Module\Configuration\SettingsMenu->initNavigation()
     (modules/myparcelnl/src/Module/ModuleService.php:41)
  at Gett\MyparcelNL\Module\ModuleService->getContent()
     (modules/myparcelnl/myparcelnl.php:171)
  at MyParcelNL->getContent()
     (controllers/admin/AdminModulesController.php:696)
  at AdminModulesControllerCore->postProcessCallback()
     (controllers/admin/AdminModulesController.php:921)
  at AdminModulesControllerCore->postProcess()
     (classes/controller/Controller.php:308)
  at ControllerCore->run()
     (classes/Dispatcher.php:503)
  at DispatcherCore->dispatch()
     (admin/index.php:92)

Additional context

image

Frankyet commented 1 year ago

Wanneer kunnen we een release verwachten die Prestashop 8 en php 8 ondersteund? Dit doet echt belachelijk lang, we zijn nu al weer 9 maanden verder, alle module ondersteunen Prestashop 8 en deze module houd een update tegen met alle nadelen van dien. Of wachten we op iets wat niet meer gaat komen? Ik besteed ieder jaar meer dan 20K aan Myparcel maar een up to date module kan er niet vanaf!

EdieLemoine commented 1 year ago

Merged into #217