magento-coding-standard icon indicating copy to clipboard operation
magento-coding-standard copied to clipboard

Too strict or early rule for Zend_Validate

Open 06romix opened this issue 2 years ago • 6 comments

Steps to reproduce

  1. Use Zend_Validate in your extension
  2. Validate extension with the last (26) version of Magento Coding Standard

Expected result

  1. Extension is not valid and there is a correct suggestion or it is not ERROR level but WARNING
  2. Suggested replacement is present in 2.4.0 Magento versions as it is supported to November 28, 2022

Actual result

  1. Extension not valid
  2. Suggested replacement (\Magento\Framework\Validator\ValidatorChain) is missing in 2.4.0-2.4.5

Pull request #420 bring these new changes.

06romix avatar Oct 06 '22 07:10 06romix

Hi @06romix. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Oct 06 '22 07:10 m2-assistant[bot]

Agree that this is way too early.

Even the current deployed version by Magento (2.4.5) is not fully working with this rule.

For example, check this file => https://github.com/magento/magento2/blob/2.4.5/app/code/Magento/Eav/Setup/EavSetup.php#L825

Using the EavSetup in custom code leads to this error of coding standards while this is not fully imported yet in Magento side.

MeCapron avatar Oct 07 '22 10:10 MeCapron

Yes, just discovered the same issue here.

torhoehn avatar Oct 13 '22 05:10 torhoehn

Definitely a bad thing to error out with a suggested replacement that does not even exist in any stable/supported Magento version.

mam08ixo avatar Oct 13 '22 10:10 mam08ixo

We also have the same issue.

LukasKiederle avatar Oct 18 '22 07:10 LukasKiederle

same issue, plus Suggested replacement: Magento\Framework\Validator\ValidateException class is missing

amazur-ext avatar Oct 18 '22 08:10 amazur-ext