Skip to content
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

Replace Zend_Validation #4612

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Replace Zend_Validation #4612

wants to merge 5 commits into from

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Feb 7, 2025

Description (*)

WIP (90%), but ready to review.

This attempts to replace another Zend_ library.

I did not choose laminas (as earlier suggested in #3199), nor symfony. No framework, straight-forward validation.

See https://github.com/Respect/Validation

Related Pull Requests

@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: Checkout Relates to Mage_Checkout Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: Adminhtml Relates to Mage_Adminhtml Component: Api PageRelates to Mage_Api Component: Contacts Relates to Mage_Contacts Component: Admin Relates to Mage_Admin Component: Wishlist Relates to Mage_Wishlist Component: Review Relates to Mage_Review Component: Newsletter Relates to Mage_Newsletter Component: ImportExport Relates to Mage_ImportExport composer Relates to composer.json phpunit labels Feb 7, 2025
Copy link

sonarqubecloud bot commented Feb 7, 2025

@sreichel sreichel marked this pull request as draft February 7, 2025 01:26
@Hanmac
Copy link
Contributor

Hanmac commented Feb 7, 2025

sad no symfony noises xD

Also, you might need to look at this:

@deprecated Calling `validate()` directly from rules is deprecated. Please use {@see \Respect\Validation\Validator::isValid()} instead.

@sreichel
Copy link
Contributor Author

sreichel commented Feb 7, 2025

sad no symfony noises xD

I tried, but writing rules is more intuitive with that ... imho.

Also, you might need to look at this:

@deprecated Calling `validate()` directly from rules is deprecated. Please use {@see \Respect\Validation\Validator::isValid()} instead.

I am aware of it, but latest version requies php 8.1.

@Hanmac
Copy link
Contributor

Hanmac commented Feb 7, 2025

for the current changes in this MR, Symfony Validator might be easy too.

the bigger use would be that we could validate entire objects like Customer Address at once

Also the Intl/Translation support is nice, so we could have the errors already translated by the System

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Admin Relates to Mage_Admin Component: Adminhtml Relates to Mage_Adminhtml Component: Api PageRelates to Mage_Api Component: Catalog Relates to Mage_Catalog Component: Checkout Relates to Mage_Checkout Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: ImportExport Relates to Mage_ImportExport Component: Newsletter Relates to Mage_Newsletter Component: Review Relates to Mage_Review Component: Wishlist Relates to Mage_Wishlist composer Relates to composer.json new feature phpunit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants