Skip to content

SPL: SplFileObject::setFlags(null) soft-null E_DEPRECATED (#31796) - #31799

Merged
PurHur merged 1 commit into
masterfrom
fix/31796-splfileobject-setflags-null
Aug 17, 2026
Merged

SPL: SplFileObject::setFlags(null) soft-null E_DEPRECATED (#31796)#31799
PurHur merged 1 commit into
masterfrom
fix/31796-splfileobject-setflags-null

Conversation

@PurHur

@PurHur PurHur commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • SplFileObject::setFlags(null) now emits Zend-matching E_DEPRECATED and soft-coerces to 0 via parseZParamLongBuiltinArgForFrame (was silent toInt()).
  • PHPT + focused VMTest + VM/JIT unit coverage.

Closes #31796

Test plan

  • php bin/vm.php test/repro/maintainer_gap_splfileobject_setflags_null.php → DEP + flags=0
  • ./script/phpunit.sh --filter 'Issue31796SplFileObjectSetFlagsNullTest|SplFileObjectSetFlagsNullSoft31796VMTest' — OK (4)
  • php script/bootstrap-inventory.php --check — OK 7553/7553

Made with Cursor

Use Z_PARAM_LONG soft-null coercion so null flags deprecates and stores 0
like php-src, instead of silent toInt().

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit c247b8a into master Aug 17, 2026
@PurHur
PurHur deleted the fix/31796-splfileobject-setflags-null branch August 17, 2026 04:14
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: SplFileObject::setFlags(null) silent — Zend E_DEPRECATED soft coerce (ext/spl/spl_directory.c)

1 participant