magento / magento-coding-standard

Magento Coding Standard
Open Software License 3.0
349 stars 153 forks source link

Too strict or early rule for Zend_Validate #423

Open 06romix opened 2 years ago

06romix commented 2 years ago

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.

m2-assistant[bot] commented 2 years ago

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


MeCapron commented 2 years ago

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.

torhoehn commented 2 years ago

Yes, just discovered the same issue here.

mam08ixo commented 2 years ago

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

LukasKiederle commented 2 years ago

We also have the same issue.

amazur-ext commented 2 years ago

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