Skip to content

Div PHP Laze 1.0.0

Compare
Choose a tag to compare
@rafageist rafageist released this 13 Aug 05:29
· 17 commits to main since this release

This initial release of laze introduces a powerful PHP library designed for lazy evaluation with immutable values and constraints. laze allows you to define values as closures that are only evaluated upon first access, ensuring efficient resource usage and controlled initialization. Once evaluated, these values become immutable, providing robustness and consistency in your applications.

Key Features:

  1. Lazy Evaluation: Define values as closures that are evaluated only when needed.
  2. Immutability: Once evaluated, values cannot be redefined or modified.
  3. Constraints: Enforce validation rules on evaluated values using custom constraints.
  4. Object Support: Store and manage object instances, with constraints to ensure they meet specific interface requirements.
  5. Nested Closures: Support for closures returning other closures, allowing multi-stage lazy evaluation.
  6. Flexible Configuration: Reuse define and read methods within each other for complex, dependent configurations.
  7. Testing Support: Redefine values in PHPUnit tests, enabling flexible and isolated testing scenarios.

This release is ideal for developers seeking to optimize performance, enforce strict validation rules, and manage complex configurations in PHP applications.