lyra / plugin-magento

An open source plugin that links Magento based e-commerce websites to PayZen secure payment gateway developed by Lyra Network.
https://lyra.com/fr/guides/magento/
Open Software License 3.0
10 stars 12 forks source link

Deprecated functionnality error with PHP 8.2 #34

Closed jeromecx closed 1 year ago

jeromecx commented 1 year ago

Problem

This module doesn't work after migration to PHP 8.2.1.

Steps to reproduce

hchabane21 commented 1 year ago

Thank you for bringing this issue to our attention, we'll work on it.

cpuch commented 1 year ago

I'm facing the same isssue. I've found this as a workaround : The AllowDynamicProperties class.

The error is gone but I'm not sure about implications.

<?php
/**
 * Copyright    Lyra Network.
 * This file is part of PayZen plugin for Magento 2. See COPYING.md for license details.
 *
 * @author    Lyra Network (https://www.lyra.com/)
 * @copyright Lyra Network
 * @license   https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 */
namespace Lyranetwork\Payzen\Model\System\Config\Source;

#[\AllowDynamicProperties]
class GiftCard implements \Magento\Framework\Option\ArrayInterface
{
    public function __construct(
        \Lyranetwork\Payzen\Model\Method\Gift $method
    ) {
        $this->method = $method;
    }

    public function toOptionArray()
    {
        $options =  [];

        foreach ($this->method->getSupportedCcTypes() as $code => $name) {
            $options[] = [
                'value' => $code,
                'label' => $code . ' - ' . $name
            ];
        }

        return $options;
    }
}
nberhouche commented 1 year ago

Hello there,

Thank you for you patience. We are a working on a hotfix to address this issue and other possible incompabilities with PHP 8.2.x Wel''l keep you posted.

Best regards.

jeromecx commented 1 year ago

hello @nberhouche ,

Any news about this update ? Please, could you give us a release date ?

Thank you in advance

nberhouche commented 1 year ago

Hello @jeromecx,

It seems there was an oversight from our part, as the 2.7.2 version containing the fix has already been released (on the 24th of August, to be exact), we apologize for that and thank your for your patience.

Best regards.

jeromecx commented 1 year ago

This is a good news, thank you very much @nberhouche, I'll close this issue Regards,