You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run vendor/bin/phpcs --standard=Magento2 app/code/Vendor/Module/Setup/Patch/Data/AddTestAttribute.php
Expected result
class 'Zend_Validate_Exception' is restricted in app/code/Vendor/Module/Setup/Patch/Data/AddTestAttribute.php.
Suggested replacement: Magento\Framework\Validator\Exception
Actual result
class 'Zend_Validate_Exception' is restricted in app/code/Vendor/Module/Setup/Patch/Data/AddTestAttribute.php.
Suggested replacement: Magento\Framework\Validator\ValidateException
Preconditions
Add attribute in Data Patch using
$eavSetup->addAttribute()
method.Place DataPatch in Vendor/Module/Setup/Patch/Data/AddTestAttribute.php file.
Example
Steps to reproduce
run
vendor/bin/phpcs --standard=Magento2 app/code/Vendor/Module/Setup/Patch/Data/AddTestAttribute.php
Expected result
Actual result
Line
magento-coding-standard/Magento2/Sniffs/Legacy/_files/restricted_classes.php
Line 129 in 097bda3
Solution
The
Magento\Framework\Validator\ValidateException
should be replaced withMagento\Framework\Validator\Exception
The text was updated successfully, but these errors were encountered: