PHP 8.4 brings property hooks, asymmetric visibility, and HTML5 DOM support. Here is how these changes affect Laravel and Magento projects.
PHP 8.4 Release: Impact on Laravel and Magento
PHP 8.4 has been officially released with several language features that will change how developers write code in Laravel and Magento applications. The headline features are property hooks, asymmetric visibility, and a new HTML5-compliant DOM API.
Property Hooks
Property hooks allow defining getter and setter logic directly on class properties without separate methods:
class Product {
public string $name {
set => strtolower($value);
get => ucfirst($this->name);
}
}
For Magento modules with extensive getter/setter boilerplate, this dramatically reduces code volume while maintaining encapsulation.
Asymmetric Visibility
Properties can now have different visibility for reading and writing:
class Order {
public private(set) string $status = 'pending';
}
Laravel Eloquent models and Magento data objects benefit from this pattern - public read access with controlled write access, without needing readonly constraints.
HTML5 DOM Support
The new Dom\HTMLDocument class properly handles HTML5 parsing, replacing the legacy DOMDocument which had known issues with modern HTML. This matters for Magento and WordPress projects that programmatically manipulate HTML content.
Upgrade Timeline
Laravel 11.x supports PHP 8.4 from day one. Magento 2.4.7+ has declared PHP 8.4 compatibility in its latest patch releases. Teams should begin testing their CI pipelines with PHP 8.4 and plan production upgrades for Q1 2026.
PHP 8.4 is a significant release that modernises the language while maintaining backward compatibility with well-structured codebases.
Read how we handle it in Cloud & Server Management.
Related News
PHP Patches Two Critical Flaws on Wednesday. Prepare Today
The PHP security team will ship fixes for two critical vulnerabilities, both CVSS v4.0 9.2, on October 21 at 14:00 UTC. Details come with the release, so today is for finding every PHP you run and knowing where its update will come from.
Server & DevOpsDocker Desktop 4.36 Introduces Resource Saver Mode
Docker Desktop 4.36 adds resource saver mode that reduces CPU and memory usage by up to 80% when containers are idle. Key update for developers.
Server & DevOpsNode.js 26 LTS Adds a Modern Date API and Support to 2029
Node.js 26 became the long-term support release on October 28, with fixes until April 2029. It turns on the Temporal date API by default, and Node.js 24 stays supported until 2028, so the upgrade can be planned calmly. Here is what changes and how to move.