Skip to content

Language: AOT ReflectionProperty::isFinal for final plain props (#27315) - #27336

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-27315-final-property-isfinal-aot
Aug 3, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-27315-final-property-isfinal-aot

Conversation

@PurHur

@PurHur PurHur commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

php-src-strict note: Zend 8.4 final on plain properties is inheritance-only (writes after construct succeed). The issue body's "write throws Error" expectation was incorrect; expected output is wrote + isFinal=1.

Closes #27315

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_final_plain_property_84.php → wrote / isFinal=1
  • PHP_COMPILER_PROFILE=8.4 php bin/jit.php test/repro/maintainer_gap_final_plain_property_84.php → same
  • PHP_COMPILER_PROFILE=8.4 ./phpc build -o /tmp/f84 … && /tmp/f84 → same
  • vendor/bin/phpunit --filter FinalPropertyOverrideCheckTest → OK (20)
  • vendor/bin/phpunit --filter final_plain_property_isfinal_84 → OK (AOT fixture)

Pillar preflight (master, before claim)

Made with Cursor

Thin AOT skipped ReflectionProperty::__construct and stored name/class in
TYPE_STRING slots that dropped __value__ boxes, so isFinal always saw empty
strings. Match #27303: TYPE_VALUE + markHasConstructor, and compare via
structGep / constantStringFromString.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 7b64e9b into master Aug 3, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-27315-final-property-isfinal-aot branch August 3, 2026 15:40
@PurHur
PurHur restored the agent/issue-27315-final-property-isfinal-aot branch August 3, 2026 15:40
PurHur added a commit that referenced this pull request Aug 3, 2026
…#27337)

Honest bootstrap-gen0-refresh-argv-driver rebuild — stamps live fingerprint
9f1b67db… after ReflectionProperty::isFinal landed past #27335. Functional
smoke OK. No restamp-only.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur deleted the agent/issue-27315-final-property-isfinal-aot branch August 5, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language: final plain properties still writable + isFinal=0 under PROFILE=8.4 (re-#26222, Zend/zend_compile.c)

1 participant