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] Logger declaration compatibility in Magento 2.4.4 #299

Closed jeroen-dhm closed 2 years ago

jeroen-dhm commented 2 years ago

To Reproduce

  1. Install TIG_PostNL in Magento
  2. Do anything

Expected result No errors

Actual result An error is thrown stating that TIG\PostNL\Loggin\Log::addRecord is not compatible with Monolog\Logger::addRecord

PHP Fatal error: Declaration of TIG\PostNL\Logging\Log::addRecord($level, $message, array $context = Array) must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = Array): bool in /data/web/magento2/vendor/tig/postnl-magento2/Logging/Log.php on line 67

Workaround None

Please complete the following information

tig-jeffreybranderhorst commented 2 years ago

Hi @jeroen-dhm,

Thank you for contacting us, we have not released a version yet that supports the newest Magento's versions because we need to test it before releasing the new version. Thank you again for already submitting this, I will place it on the backlog, so we can fix this for the new release.

Have a great day, Jeffrey

richardreen commented 2 years ago

It is some weeks later and still this error is actual. Can not upgrade to 2.4.4 because of this error. When will this be solved?

tig-jeffreybranderhorst commented 2 years ago

Hi @richardreen ,

This is correct, we are working on the new release. We made a fix for this issue, but then other issues got our attention that also need to be fixed that is why the release is not out yet.

Have a great day, Jeffrey

alex-histev commented 2 years ago

Hi @richardreen,

You can change the code in line 67 to follow:

public function addRecord(int $level, string $message, array $context = []): bool

richardreen commented 2 years ago

Hi @richardreen,

You can change the code in line 67 to follow:

public function addRecord(int $level, string $message, array $context = []): bool

Tried it, but same result!! But I am still on 2.4.3!!

richardreen commented 2 years ago

Hi @jeroen-dhm,

Thank you for contacting us, we have not released a version yet that supports the newest Magento's versions because we need to test it before releasing the new version. Thank you again for already submitting this, I will place it on the backlog, so we can fix this for the new release.

Have a great day, Jeffrey

We are more then 2 months after the release of 2.4.4. Only this extension is not updated and not compatibel with 2.4.4. It is getting annoying now!! You can write ...you can turn this extension off...but that is not a option as we are using PostNL to send the order...and this is the only extension that can do it with Magento2

tig-jeffreybranderhorst commented 2 years ago

Hi @richardreen,

We understand it can be annoying, this is of course not our intention, we are still working hard on the extension we are fixing the last issue with letterbox orders and after that we will release. Our goal is to release this week. Our advice is not to turn the extension off, the question was "Disable the extension or complete uninstall it?" That's why our advice in this scenario was to turn it off and not uninstall it.

Hoop to be able to give you good news in the upcoming days!

Have a great day, Jeffrey

tig-vincentthart commented 2 years ago

Good afternoon,

We have just released v1.12.2 with support for Magento 2.4.4. Thank you for your patience.

Have a great day! Vincent