Skip to content

Stdlib: DirectoryIterator family empty path cites $directory (#31512) - #31525

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-31512-spl-dir-null-path-message
Aug 16, 2026
Merged

Stdlib: DirectoryIterator family empty path cites $directory (#31512)#31525
PurHur merged 1 commit into
masterfrom
agent/issue-31512-spl-dir-null-path-message

Conversation

@PurHur

@PurHur PurHur commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

Verification transcript

$ ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_spl_dir_null_path_message.php'
== DirectoryIterator ==
DEP:DirectoryIterator::__construct(): Passing null to parameter #1 ($directory) of type string is deprecated
ValueError: DirectoryIterator::__construct(): Argument #1 ($directory) cannot be empty
ValueError: DirectoryIterator::__construct(): Argument #1 ($directory) cannot be empty
== FilesystemIterator ==
DEP:FilesystemIterator::__construct(): Passing null to parameter #1 ($directory) of type string is deprecated
ValueError: FilesystemIterator::__construct(): Argument #1 ($directory) cannot be empty
ValueError: FilesystemIterator::__construct(): Argument #1 ($directory) cannot be empty
== RecursiveDirectoryIterator ==
DEP:RecursiveDirectoryIterator::__construct(): Passing null to parameter #1 ($directory) of type string is deprecated
ValueError: RecursiveDirectoryIterator::__construct(): Argument #1 ($directory) cannot be empty
ValueError: RecursiveDirectoryIterator::__construct(): Argument #1 ($directory) cannot be empty

$ ./script/phpunit.sh --filter DirectoryIteratorNullPath31512VMTest
OK (1 test, 1 assertion)

Made with Cursor

Match php-src spl_directory empty/null path ValueError and null soft-DEP
param name ($directory) instead of generic Path / $filename.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit b086b25 into master Aug 16, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-31512-spl-dir-null-path-message branch August 16, 2026 18:57
PurHur added a commit that referenced this pull request Aug 16, 2026
#31538)

Align with DirectoryIterator/FilesystemIterator empty-path wording from
php-src spl_directory.stub.php (residual after #31512/#31525).

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

Development

Successfully merging this pull request may close these issues.

Regression: DirectoryIterator family null path ValueError generic Path — Zend Argument #1 ($directory) (ext/spl/spl_directory.c)

1 participant