Releases: holiq/action-data
Releases · holiq/action-data
v2.0.0
Laravel Action Data v2.0.0
This major release improves Laravel-native validation behavior and makes DTO serialization reliable for nested structures.
Highlights
Integrated Laravel ValidationException for attribute-based validation.
Improved toArray behavior with recursive conversion for nested DTOs and arrays of DTOs.
Validation errors now follow Laravel standard field-based error formatting.
Better API consistency and developer experience in Laravel applications.
What's Changed
Breaking Changes
- validateAttributes now throws Illuminate ValidationException instead of InvalidArgumentException.
- Existing try/catch logic that handles attribute validation errors must be updated accordingly.
Migration Guide
- Replace InvalidArgumentException catches used for DTO attribute validation with ValidationException.
- If you use Laravel default exception handling, no custom error formatting is required for 422 responses.
- Keep custom handlers only if you need a non-standard error response shape.
Compatibility
PHP: 8.3+
Laravel: 12.x and 13.x
Full Changelog: v1.2.1...v2.0.0
v1.2.1
v1.2.0
What's Changed
- feat: improve the docs by @holiq in #1
- feat: enhance DTOs with new methods, improve error handling, and fix … by @holiq in #2
- feat(validation): add attribute-based rules & callback pipeline by @holiq in #3
- feat(command): support make action with option --with-dto for auto generated by @holiq in #4
- docs: improve structure and new example features by @holiq in #5
New Contributors
Full Changelog: v1.1.1...v1.2.0