Skip to content

Releases: divengine/laze

Div PHP Laze 1.1.1

09 Sep 10:14
672efce
Compare
Choose a tag to compare

Minor fixes and documentation updates

#4 Some testing frameworks do not initialize the PHP process by default, such as phpunit. For this reason, it is necessary to explicitly reset the laze state during your tests. The README has a brief explanation about this.

Div PHP Laze 1.1.0

14 Aug 12:28
c83e29e
Compare
Choose a tag to compare

We're excited to announce the release of Laze v1.1.0, which brings powerful new capabilities and improvements to the library.

Key Features and Changes:

  • Support for Closures as Lazy Values: In addition to scalar values and object instances, you can now store closures as lazy values. This means Laze can handle any mixed type, offering greater flexibility in how you define and manage your lazy evaluations.
  • Evaluation Tracking with evaluated() Method: Introducing the new evaluated() method, which allows you to check whether a lazy value has been materialized (evaluated) or if it remains in its initial state. This provides greater control and insight into the lifecycle of your lazy values.
  • Clear Differentiation from PHP Constants: We’ve introduced the concept of lazy immutable value to distinguish the library’s functionality from PHP’s native constants. This ensures that users understand these values are not traditional constants but are instead values that, once evaluated, become immutable.

With these enhancements, laze becomes even more versatile, allowing you to manage a wide variety of lazy values with precision and control. Whether you're dealing with simple scalars, complex objects, or even functions that should be deferred, laze has you covered.

Div PHP Laze 1.0.0

13 Aug 05:29
Compare
Choose a tag to compare

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.