Releases: tanthammar/laravel-rules
Releases · tanthammar/laravel-rules
added BusinessNameFromVatID case
Enhance BusinessNameFromVatID service with improved error handling
- Add Invalid error case to BusinessNameLookupError enum for invalid VAT IDs
- Add label() method to BusinessNameLookupError for human-readable messages
- Pre-validate VAT format before external API calls to avoid unnecessary requests
- Update README documentation to reflect new error handling capabilities
🤖 Generated with Claude Code
fix name removed in last commit
6.0.1 fix only name return
BREAKING CHANGE: Refactor BusinessNameFromVatID to returns ENUM instead of translated strings
BREAKING CHANGE: Refactor BusinessNameFromVatID to returns ENUM instead of translated strings
- Add BusinessNameLookupError enum for error cases (Unknown, ServiceUnavailable)
- BusinessNameFromVatID::lookup() now returns object|BusinessNameLookupError instead of string
- On success: returns full VAT details object with name, address, vatNumber properties
- On error: returns BusinessNameLookupError enum instead of translated error messages
- Update README.md with new usage examples showing error handling patterns
This change provides access to complete VAT information while maintaining clean error handling through enums.
New Vat rules, drop laravel 9, breaking return types
✅ New: VatNumberAPI
✅ BREAKING CHANGE: Laravel 9 Support Dropped
- Removed Laravel 9.0 support, now requires Laravel 10.0+
✅ BREAKING CHANGE: BusinessNameFromVatID Return Values
- File: src/Services/BusinessNameFromVatID.php
- Change: Now returns exception messages instead of generic "unknown" message when API is unavailable
- Impact: Different error messages returned, may break code expecting specific text
- Before: Always returned trans('laravel-rules::messages.vat-name-unknown') on API failure
- After: Returns specific API error messages like "VIES EU Vat service api is unavailable. Please try again later." trans('laravel-rules::messages.vies-eu-unavailable')
✅ NON-BREAKING: Deprecation Warnings
- File: src/Rules/VatNumber.php
- Change: Added deprecation notice but maintained existing behavior
- Impact: No breaking change, just deprecation warning
✅ NON-BREAKING: RuleHelpers Refactoring
- File: src/RuleHelpers.php
- Change: Methods now delegate to new service classes but maintain same signatures
- Impact: No breaking change to public API
update dependencies
Updated
- brick/phonenumber from 0.6.0 to 0.8.0
- organisationsnummer/organisationsnummer from 1.x to 2.1.0
Bumping v, but no known breaking changes.
There are no known breaking changes related to rules in this pkg but if you use other parts of those dependencies read each pkg breaking changes.
fix validation trans path
3.4.1 trans path
Laravel 12
3.4.0 Update composer.json
Laravel 11
3.2.0 Update composer.json
Fix validation messages translations path
3.1.1 fix validator translations
more alpha dash rules + gdpr safe mobile/phone numbers
gdpr safe fake mobile and line line numbers + laravel lint cleanup