Skip to content

# v2.2.1 - Modern PHP Release (Recommended php7.2+)

Choose a tag to compare

@estefanionsantos estefanionsantos released this 20 Apr 00:35

This is the recommended stable version for modern PHP environments. It includes critical bug fixes and full support for strict typing and return type declarations.

Why upgrade to v2.2.x?

Unlike the legacy v1.x branch, this version is optimized for PHP 7.2 and 8.x, offering better performance, type safety, and compatibility with modern development standards.

Fixed in this release

  • Critical Fix (ArrElement): Resolved a persistence issue where internal state was lost during property initialization. The ArrElement::get() method now correctly implements lazy loading with persistence.
  • Improved Type Safety: Added explicit return type hints (: object, : string) across the CreateElement class and its interfaces, ensuring compliance with strict_types=1.

Key Features

  • Strict Typing: Fully utilizes declare(strict_types=1) for predictable behavior and fewer runtime errors.
  • Fluent Component Architecture: Build complex HTML structures with a clean, chainable API.
  • Modern Standards: Optimized for current PHP engines (7.2, 7.4, 8.0, 8.1, 8.2+).

Installation

To use this modern version, update your composer.json:

{
    "require": {
        "rubricate/element": "^2.2"
    }
}