magento-1
magento-1 copied to clipboard
PHP 8 Compatibility
Is this extension PHP8 compatible? And if no: Are there plans or even an ETA for when it will be?
Hi @Schrank we don't have any plans for this right now, but will assess the situation soon(ish) and then circle back here
@hreinberger , I just ran a phpcs compatibility checker on the module, checking compatibility with PHP 8.1 I think it would not be that complex to provide the compatibility. The following warnings came up:
FILE: /var/www/html/app/code/community/Payone/Core/Model/Service/Config/PaymentMethod/Create.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
75 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $scope is optional, while parameter $scopeId is required.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Do you see an issue in setting a default value of 0 for the $scopeId ?
FILE: /var/www/html/app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Genericpayment.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
130 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $month is optional, while parameter $configParams is required.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Could $configParams be an empty array as default?
FILE: /var/www/html/app/code/community/Payone/Core/Model/Domain/Protocol/TransactionStatus.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
121 | WARNING | Method name "Payone_Core_Model_Domain_Protocol_TransactionStatus::__toArray" is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
That is actually coming from \Varien_Object, so not really changeable
If you could shortly confirm my named suggestions for the default values, I would be happy to provide a fixing PR.