Skip to content

Language: Closure::fromCallable([, method]) keeps object receiver (#27137, #27143) - #27161

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-27137-fromcallable-this-private
Aug 3, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-27137-fromcallable-this-private

Conversation

@PurHur

@PurHur PurHur commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #27137
Closes #27143

Test plan

  • Zend/VM/JIT/AOT: test/repro/maintainer_gap_fromcallable_private.php → this_form=7
  • Zend/VM/JIT/AOT: test/repro/maintainer_gap_fromcallable_protected.php → this_form=A
  • #27138 static-scope TypeError still green on VM
  • PHPUnit filter matching new + related fromCallable cases: OK (6 tests)

Verification transcript

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_fromcallable_private.php'
# this_form=7
./script/docker-exec.sh -- bash -lc './phpc build -o /tmp/fc_priv test/repro/maintainer_gap_fromcallable_private.php && /tmp/fc_priv'
# this_form=7
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_fromcallable_protected.php'
# this_form=A
./script/docker-exec.sh -- bash -lc './phpc build -o /tmp/fc_prot test/repro/maintainer_gap_fromcallable_protected.php && /tmp/fc_prot'
# this_form=A

php-src: Zend/zend_closures.c — object+method callable; PHP impl in lib/Compiler.php + lib/VM/VmFromCallable.php.

Made with Cursor

#27137, #27143)

Lower object-array fromCallable to TYPE_FROM_CALLABLE like bound-method FCC so `$this` is not folded to class name "this", and walk parent proxies for inherited instance methods under AOT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 84af06a into master Aug 3, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-27137-fromcallable-this-private branch August 3, 2026 05:24
PurHur added a commit that referenced this pull request Aug 3, 2026
)

Pillar 1: north-star5-verify-fast failed on lowering_source_fingerprint
mismatch after tanh NestedJIT + Closure::fromCallable. Honest argv rebuild
(functional smoke OK) stamps fingerprint d142f929… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur added a commit that referenced this pull request Aug 3, 2026
)

Pillar 1: north-star5-verify-fast failed on lowering_source_fingerprint
mismatch after tanh NestedJIT + Closure::fromCallable. Honest argv rebuild
(functional smoke OK) stamps fingerprint d142f929… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur added a commit that referenced this pull request Aug 3, 2026
…27168)

* Trust: refresh gen-0 argv driver fingerprint after #27160/#27161 (#27162)

Pillar 1: north-star5-verify-fast failed on lowering_source_fingerprint
mismatch after tanh NestedJIT + Closure::fromCallable. Honest argv rebuild
(functional smoke OK) stamps fingerprint d142f929… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trust: re-stamp gen-0 argv fingerprint after #27166 sinh (#27162)

Master landed sinh NestedJIT (#27166) during the prior refresh race;
honest argv rebuild stamps fingerprint 1742933d… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trust: re-stamp gen-0 argv after merge race (#27162)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur added a commit that referenced this pull request Aug 3, 2026
#27137, #27143) (#27161)

Lower object-array fromCallable to TYPE_FROM_CALLABLE like bound-method FCC so `$this` is not folded to class name "this", and walk parent proxies for inherited instance methods under AOT.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur added a commit that referenced this pull request Aug 3, 2026
…27168)

* Trust: refresh gen-0 argv driver fingerprint after #27160/#27161 (#27162)

Pillar 1: north-star5-verify-fast failed on lowering_source_fingerprint
mismatch after tanh NestedJIT + Closure::fromCallable. Honest argv rebuild
(functional smoke OK) stamps fingerprint d142f929… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trust: re-stamp gen-0 argv fingerprint after #27166 sinh (#27162)

Master landed sinh NestedJIT (#27166) during the prior refresh race;
honest argv rebuild stamps fingerprint 1742933d… (verified-fresh).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trust: re-stamp gen-0 argv after merge race (#27162)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant