I have an old module that uses this in the constructor

\Zend_Filter_Interface $templateProcessor

Can anyone tell me what I can replace this with as it throws error on setup:di:compile when upgrading to 2.4.6

2 Answers 2


Most of the Zend namespace can be replaced with Laminas.

In your specific case, \Zend_Filter_Interface can be replaced with \Laminas\Filter\FilterInterface


You can replace with Magento\Framework\Filter\FilterInput. Like:

$inputFilter = new \Magento\Framework\Filter\FilterInput(
        ['date_from' => $this->dateFilter, 'date_to' => $this->dateFilter],

you can also get help from this link :: Which class replace for "Zend_Validate" in Magento 2.4.6?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.