-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RestrictedCodeSniff suggests Laminas\Filter\FilterInterface, which is not required by Magento 2.4.5-p1 anymore #428
Comments
Hi @norgeindian. Thank you for your report. Add a comment to assign the issue:
|
Hi @norgeindian, |
@ihor-sviziev , my class looks like this:
Like I said, as soon as I run
But since Magento 2.4.5-p1, Laminas is not included anymore by the Magento Core. |
@norgeindian the laminas filter is actually included in Magento 2.4.6 and 2.4.6-p1, and your custom extension can also add to requreiments the package you need |
@ihor-sviziev , thanks for pointing that out, but it's not included in any 2.4.5 version (see https://github.com/magento/magento2/blob/2.4.5-p4/composer.json). |
@ihor-sviziev , what's your opinion here? |
@norgeindian in my opinion, if your extension depends on some laminas library, it should declare such dependence in require section. Otherwise you'll see such errors. |
Preconditions
Steps to reproduce
\Zend_Filter_Interface
in the constructorvendor/bin/phpcs --standard=dev/tests/static/framework/Magento
on that file.Expected result
RestrictedCodeSniff
should suggest a class, which exists in a clean Magento instanceActual result
ERROR | Class 'Zend_Filter_Interface' is restricted in XXX. Suggested replacement: Laminas\Filter\FilterInterface
The text was updated successfully, but these errors were encountered: