[php-src] PR #20378: Fix GH-20377: emit assignment for all final promoted properties
| From: | DanielEScherzer | Date: | Mon, 03 Nov 2025 18:50:16 +0000 |
| Subject: | [php-src] PR #20378: Fix GH-20377: emit assignment for all final promoted properties | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-33909@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20378
Author: DanielEScherzer
Previously, the assignment op line was only emitted when one of the other flags allowed for promoted
properties (visibility, set visibility, or readonly) was also used, or when the property had hooks.
The property was still added to the class, but the magical assignment
$this->prop =
$prop was missing. Add that assignment even when no visibility is explicitly specified, and a
test to confirm the fix.