postnl / postnl-magento2

This is the official Magento 2 extension for the logistics company PostNL. Add shipping options and parcelshops to your checkout. Create labels with track and trace functionality from the backend.
58 stars 61 forks source link

[BUG] PHP7.4 incompatibility #386

Closed walter-smulders-diploc closed 1 month ago

walter-smulders-diploc commented 1 month ago

To Reproduce Steps to reproduce the behavior:

  1. Install the latest version (1.15.2) of the plugin using PHP7.4
  2. Run s:upgrade
  3. Run s:d:compile
  4. Compile will fail because the following classes have a comma in __construct:
    • Controller/Adminhtml/Shipment/GetSmartReturnLabel.php
    • Service/Shipment/ShipmentLoader.php
    • Controller/Adminhtml/Order/MassChangeMulticolli.php

Expected result Compilation should succeed without error

Actual result Compilation fails because some classes are not PHP7.4 compatible but composer.json states the module should be.

Workaround Update the 3 classes to be PHP7.4 compatible

bmelman commented 1 month ago

comfirmed starting version 1.14.0 fails to compile on PHP7.4

JorisPostNL commented 1 month ago

Hi @walter-smulders-diploc amd @bmelman,

Thank you for bringing this to our attention. We are aware of the issue and are currently developing a fix which will be included in the next release.

Kind regards, Joris - PostNL

YachYaroslav commented 1 month ago

Here is a patch if someone is interested in a quick fix:

removePHP80FunctionArgumentListTrailingCommas.zip