Remove validation from Vat constructor and related test cleanup - #75
Merged
Conversation
Copilot stopped work on behalf of
janlanger due to an error
August 20, 2025 15:01
janlanger
marked this pull request as ready for review
August 20, 2025 15:01
Member
|
@copilot remove also test that tested the validation (VatTest) |
Co-authored-by: janlanger <415695+janlanger@users.noreply.github.com>
Contributor
Author
Removed the validation test method and unused InvalidArgumentException import from VatTest as requested. Commit: db12bb1 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Remove validation from Vat constructor and unused Validator import
Remove validation from Vat constructor and related test cleanup
Aug 20, 2025
janlanger
approved these changes
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes validation logic from the
Vatconstructor that was preventing negative amounts, along with cleaning up related test code and unused imports.Changes made:
Validator::checkNumberPositiveOrZero($amount)check that was throwing exceptions for negative amountsuse SlevomatCsobGateway\Validator;import from Vat classtestValidation()method from VatTest that was specifically testing the removed validation logicuse InvalidArgumentException;import from VatTestThe Vat class now accepts any integer amount value (including negative values) without validation, while maintaining all other functionality. The remaining tests continue to verify the core encoding behavior.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.