What is Valinor?
masterValinor is a PHP library designed to transform raw inputs (such as JSON or plain arrays) into strongly typed objects. It handles both the construction and the validation of these objects, ensuring they are in a perfectly valid state before they are used in your application.
Key features include:
- Type Safety: Guarantees object structure so you don't need manual type checks after construction.
- Data Integrity: Prevents objects from ever entering an invalid state.
- Advanced Type Support: Handles native PHP types as well as advanced types like shaped arrays, generics, and integer ranges (compatible with PHPStan and Psalm).
- Precise Error Reporting: Provides human-readable error messages when validation fails.
- Normalization: Includes a mechanism to transform objects back into data formats like JSON or CSV while preserving structure.