Worldpay-Magento2-CG icon indicating copy to clipboard operation
Worldpay-Magento2-CG copied to clipboard

Update Usage of Deprecated class Zend\Validator\File\Exists to \Laminas\Validator\File\Exists in PaymentMethods.php

Open obsergiu opened this issue 6 months ago • 2 comments

Hello,

The recent PR did not address the deprecated code issue in the file

vendor/sapient/module-worldpay/Model/Utilities/PaymentMethods.php. 

The error being reported is:

main.CRITICAL: Error: Class "Zend\Validator\File\Exists" not found in vendor/sapient/module-worldpay/Model/Utilities/PaymentMethods.php:173
As the Zend\Validator\File\Exists class is no longer available, we need to update the code accordingly. 

Need to swap the:

$validator = new \Zend\Validator\File\Exists();

With:

$validator = new \Laminas\Validator\File\Exists();

Tested in Magento2.4.6-p2.

obsergiu avatar Feb 07 '24 08:02 obsergiu