Worldpay-Magento2-CG
Worldpay-Magento2-CG copied to clipboard
Update Usage of Deprecated class Zend\Validator\File\Exists to \Laminas\Validator\File\Exists in PaymentMethods.php
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.