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

Refactored Float and Integer field types to use external validators #425

Merged
merged 10 commits into from
Aug 28, 2024

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Aug 27, 2024

🎫 Issue Related to IBX-8138

Related PRs:

Description:

This PR delegates redundant validation code in Float and Integer field types to proper, already existing validators.
Also refactored tests, including tests for String validator due to similarities.

I've moved scope-affected Integer, Float, and String Validator test classes to the correct Validator namespace, reflecting better src namespace structure.

For QA:

Regression build should be enough (ibexa/commerce#1010).

@alongosz alongosz force-pushed the ibx-8138/numeric-ft-validators-dry-fix branch from 9a56748 to 8493436 Compare August 28, 2024 12:20
Copy link

@alongosz
Copy link
Member Author

Update: added via a887e22 missing return types to FloatValueValidator::validate and IntegerValueValidator::validate methods and simplified PHPDocs.

@alongosz alongosz requested review from adamwojs, Steveb-p and a team August 28, 2024 12:27
@alongosz alongosz merged commit 7c398f2 into main Aug 28, 2024
13 checks passed
@alongosz alongosz deleted the ibx-8138/numeric-ft-validators-dry-fix branch August 28, 2024 13:32
barw4 pushed a commit that referenced this pull request Oct 17, 2024
…425)

For more details see #425

Key changes:

* Refactored Float and Integer field types to use external validators

* [Tests] Refactored Float, Integer, and String validator tests

---------

Co-authored-by: Adam Wójs <[email protected]>
Co-authored-by: Paweł Niedzielski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants