Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 211 forks source link

Deprecated Functionality: Creation of dynamic property $adyenHelper is deprecated #2750

Closed adamkarnowka closed 1 month ago

adamkarnowka commented 1 month ago

Hello - There is an error in the file: https://github.com/Adyen/adyen-magento2/blob/main/Model/Resolver/StoreConfig/StoreLocale.php#L27

Describe the bug When graphql schema is fetched, it cannot fetch because of error:

Deprecated Functionality: Creation of dynamic property Adyen\Payment\Model\Resolver\StoreConfig\StoreLocale\Interceptor::$adyenHelper is deprecated in /app/xxxxxxxxxxx/vendor/adyen/module-payment/Model/Resolver/StoreConfig/StoreLocale.php on line 35

Because property is called protected Data $dataHelper; while in constructor you are using $this->adyenHelper = $adyenHelper; (dataHelper != adyenHelper)

To Reproduce

  1. Have latest version installed and php8.2
  2. Try to fetch graphql schema:
    {
    __schema {
        types {
            __typename
        }
    }
    }

Expected behavior Schema is fetched without errors

Magento version 2.4.6-p7

Plugin version 9.8.1

Screenshots image

dimitriBouteille commented 1 month ago

🚀 https://github.com/Adyen/adyen-magento2/pull/2743

candemiralp commented 1 month ago

Hello @adamkarnowka and @dimitriBouteille ,

Thank you for reporting this issue and providing a fix. The fix will be merged.

Best Regards, Can