doofinder / doofinder-magento2

Open Software License 3.0
10 stars 9 forks source link

PLUGINRANGERS-2316 | Fixed dependency injection on parent construct to avoid issues with Magento 2.4.7 #313

Closed davidmolinacano closed 5 months ago

davidmolinacano commented 5 months ago

Required by:

In the image, the error is shown and then the result after applying this fix

image

Original parent constructor:

image

Aitor-Corrales commented 5 months ago

This seems to be a problem with the static files, not with the dependency itself. Isn't it necessary that dependency anymore?

davidmolinacano commented 5 months ago

This seems to be a problem with the static files, not with the dependency itself. Isn't it necessary that dependency anymore?

As far as I've seen the parent::__construct() does not need the Helper among their parameters. In fact, with PHP 8.2 event the PHP Lint is complaining about this without having to even launch the setup:di:compile:

Before:

image

After removing the helper:

image

davidmolinacano commented 5 months ago

I misinterpreted the situation, sorry. In that case, make sure to remove the dependency in this class's constructor to keep it a little bit cleaner

Fixed on: https://github.com/doofinder/doofinder-magento2/pull/313/commits/89f8e329c787c819866d98618bc0cb77f907272c