Skip to content

v4.0.0 - Strict Typing Enforcement & Engine Modernization

Latest

Choose a tag to compare

@estefanionsantos estefanionsantos released this 29 Jun 19:50

This major release upgrades the core infrastructure to PHP 8.2+, introducing strict type safety, modernized language features, and enhanced architectural robustness across the entire element generator.

Breaking Changes

  • Minimum PHP Version: The component now strictly requires PHP 8.2 or higher.
  • Strict Type Declarations: Added declare(strict_types=1); to all core interfaces and implementation files, enforcing rigid type constraints on data mutation.

Refactoring & Modernization

  • Constructor Property Promotion: Applied to concrete classes (StrElement, CreateElement, AttributeElement) to eliminate boilerplate state assignments.
  • Return Type Signatures: Upgraded fluent method wrappers (addChild, setAttribute, add) from self to static return types to prevent cascading context inheritance breaks.
  • Array Collections Optimization: Modernized internal data management inside ArrElement leveraging lazy-loaded ArrayObject tracking and strict string/int union validation logic.
  • Standards Compliance: Rewrote code formatting across the entire vendor tree to strictly align with modern PSR-12 / PER Coding Standards.

Documentation

  • Metadata Badges: Structured dynamic status shields inside the README.md for real-time tracking of package downloads, versions, and licensing metadata.
  • Description Sync: Updated package descriptors to reflect comprehensive XML and HTML node construction engines.
composer require rubricate/element:^4.0