Skip to content

Language: emit implicit-nullable E_DEPRECATED on file compile (#22987) - #22991

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-22987-implicit-nullable-file-deprecation
Jul 25, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-22987-implicit-nullable-file-deprecation

Conversation

@PurHur

@PurHur PurHur commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #22987

php-src reference

  • Zend/zend_compile.c — zend_compile_params / deprecate-implicitly-nullable-types
  • PHP impl: lib/Compiler.php, lib/Runtime.php

Verification

# Issue repro (guest DEFAULT masks E_DEPRECATED until -d / INI; Zend 8.4 default is E_ALL)
PHP_COMPILER_PROFILE=8.4 php bin/vm.php -d error_reporting=E_ALL /tmp/impl_file.php
# → four "PHP Deprecated: Implicitly marking parameter $…" lines, then ok

./script/phpunit.sh --filter 'implicit_nullable_parameter'
# OK (3 tests) — eval #21390 + new file-level #22987 + profile 8.3 negative

Trust gates (pre-claim)

Test plan

  • File-level PROFILE=8.4 deprecations with -d error_reporting=E_ALL
  • Eval path still emits four handler notices
  • New file-level compliance phpt green
  • PROFILE=8.3 negative case still green

Made with Cursor

File-level parseAndCompile runs before VM::running() is set, so the
8.4 deprecation only fired for eval. Wire Runtime's VMContext into the
Compiler and emit via that path so main scripts match Zend.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 33a3482 into master Jul 25, 2026
@PurHur
PurHur deleted the agent/issue-22987-implicit-nullable-file-deprecation branch July 25, 2026 10:44
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.

Language: implicit nullable (int $x = null) E_DEPRECATED only via eval — file parseAndCompile silent (re-#21390, Zend/zend_compile.c)

1 participant