Skip to content

Stdlib: VmDirOpenFailure SSOT — data:// scandir + errno followup (#18418)#18424

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-dir-open-followup
Jul 12, 2026
Merged

Stdlib: VmDirOpenFailure SSOT — data:// scandir + errno followup (#18418)#18424
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-dir-open-followup

Conversation

@PurHur

@PurHur PurHur commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to merged #18420/#18418 core fix — remaining php-src-strict gaps:

  • data:// URIsscandir() now emits not implemented + (errno 0): Success instead of No such file or directory (host scandir short-circuited in VmDirNative).
  • Missing path errno — VM scandir() now emits second warning scandir(): (errno 2): No such file or directory matching Zend (was VM-only single warning).
  • SSOTVmDirOpenFailure + ScandirFailureJitHelper unify VM/JIT dir-open diagnostics; VmFsPhpWrapper::openDirFailureReason() delegates.

Verification

./script/phpunit.sh --filter "scandir_dir_open_errno|scandir_filter_wrapper"
# OK (4 tests, 4 assertions)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php -r "@scandir(\"data://text/plain,hello\");" 2>&1
php bin/vm.php -r "@scandir(\"/nonexistent\");" 2>&1'

Relates to #18418 (core merged in #18420).

Made with Cursor

)

Centralize dir-open failure classification; short-circuit non-directory wrappers
before host scandir; emit Zend errno followup for all scandir failures on VM/JIT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit c7b4a78 into master Jul 12, 2026
@PurHur PurHur deleted the agent/advanced-stdlib-dir-open-followup branch July 12, 2026 23:58
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.

1 participant