experius / Magento-2-Module-Experius-WysiwygDownloads

Available At Packagist
https://packagist.org/search/?q=experius
Open Software License 3.0
98 stars 24 forks source link

Error in the plugin #29

Closed ASEnobis closed 5 months ago

ASEnobis commented 5 months ago

Hello everyone,

Thank you very much for the great module.

We found a problem with the plugin (Experius\WysiwygDownloads\Plugin\Magento\MediaGalleryUi\Ui\Component\Listing\Columns\Url).

The class used ("use Experius\Core\Helper\Settings;") does not exist. A replacement with ("use Experius\WysiwygDownloads\Helper\Settings;") no longer generated an error during setup:di:compile.

Thank you very much and have a nice weekend Adam

gkopec commented 5 months ago

@ASEnobis I create a PR for that issue: https://github.com/experius/Magento-2-Module-Experius-WysiwygDownloads/pull/30

ASEnobis commented 5 months ago

Thank you very much. However, we were able to determine that the class url (Experius\WysiwygDownloads\Plugin\Magento\MediaGalleryUi\Ui\Component\Listing\Columns\Url) is programmed according to php8 or higher in the Construcktor. So there is no php7.4 support available. Wouldn't it be interesting for compatibility reasons to implement this according to the old method (see below). Otherwise it would be good to set the requiremend in the composer file to php min 8?

Have a nice day Adam

    /**
     * @var Filesystem
     */
    public  $filesystem;

    /**
     * @var StoreManagerInterface
     */
    public  $storeManager;

    /**
     * @var Settings
     */
    public  $helperSettings;

    /**
     * @param Filesystem $filesystem
     * @param StoreManagerInterface $storeManager
     * @param Settings $helperSettings
     */
    public function __construct(
        Filesystem $filesystem,
        StoreManagerInterface $storeManager,
        Settings $helperSettings
    ) {
        $this->filesystem = $filesystem;
        $this->storeManager = $storeManager;
        $this->helperSettings = $helperSettings;
    }
thespacersm commented 5 months ago

Confirm the problem:

Impossible to process constructor argument Parameter #2 [ Experius\Core\Helper\Settings $helperSettings ] of Experius\WysiwygDownloads\Plugin\Magento\MediaGalleryUi\Ui\Component\Listing\Columns\Url class

borisvankatwijk commented 5 months ago

Hi @ASEnobis ,

cc @thespacersm , @gkopec

We have just merged the PR. The new release should be working in full: https://github.com/experius/Magento-2-Module-Experius-WysiwygDownloads/releases/tag/1.2.2

Furthermore we have taken your advice to up the PHP 8 requirements correctly in the composer.json.

Kind regards, Boris