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) fromselftostaticreturn types to prevent cascading context inheritance breaks. - Array Collections Optimization: Modernized internal data management inside
ArrElementleveraging lazy-loadedArrayObjecttracking 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.mdfor 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