Skip to content

php-in-php: VmFs readlink/symlink/touch — drop host @readlink/@symlink/@touch (#8430) - #8432

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-link-touch-native
Jun 13, 2026
Merged

php-in-php: VmFs readlink/symlink/touch — drop host @readlink/@symlink/@touch (#8430)#8432
PurHur merged 1 commit into
masterfrom
agent/runtime-php-link-touch-native

Conversation

@PurHur

@PurHur PurHur commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Route VM readlink() / symlink() through VmFsPathNative libc readlink(2) / symlinkat(2) FFI (pairs existing JitReadlink / JitSymlink).
  • Add VmFsTouchNative with stat/open/utime parity to StringFsDirJit::emitTouch; VmFs::touch() no longer calls host @touch().
  • Extend runtime-shrink unit tests; wire VmFsTouchNative into spine smoke require_once list.
  • C runtime: 0 lines added (lib/AOT/runtime/phpc_progress.c unchanged).

php-src reference

  • ext/standard/link.c — readlink/symlink
  • ext/standard/filestat.c — php_touch

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter "VmFsRuntimeShrink|VmFsPathNative|TouchBuiltinTest::testVm|ReadlinkBuiltinTest::testVm" test/unit/'
# OK (12 tests, 79 assertions)

make bootstrap-selfhost-link
# bootstrap-selfhost-link: OK build/selfhost

grep -n '@readlink\|@symlink\|@touch' ext/standard/VmFs.php || echo "no host delegation"
# no host delegation

Closes #8430

Made with Cursor

…link/@symlink/@touch (#8430)

Route VM path ops through VmFsPathNative readlink(2)/symlinkat(2) and new
VmFsTouchNative utime/stat/open helpers so bootstrap no longer depends on
Zend for these syscalls. JIT/AOT paths unchanged. 0 C runtime lines added.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit cb6a3c1 into master Jun 13, 2026
@PurHur
PurHur deleted the agent/runtime-php-link-touch-native branch June 13, 2026 22:01
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.

php-in-php: VmFs readlink/symlink/touch — drop host @readlink/@symlink/@touch delegation (#7971 phase 3)

1 participant