You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language: implicit nullable (int $x = null) E_DEPRECATED only via eval — file parseAndCompile silent (re-#21390, Zend/zend_compile.c) #22987
lib/Compiler.php (message already present near the implicit-nullable path) — ensure file CFG compile emits the same E_DEPRECATED as the eval/compiler_language_warning path
Do not rely on compliance eval() alone
Repro
./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_PROFILE=8.4cat > /tmp/impl_file.php <<'"'"'PHP'"'"'<?phperror_reporting(E_ALL);set_error_handler(static function (int $errno, string $msg): bool { echo sprintf("[%d] %s\n", $errno, $msg); return true;});function f(int $x = null): void {}class C { public function m(int $y = null): void {} }$c = function (int $z = null): int { return 1; };$a = fn (int $w = null): int => 1;echo "ok\n";PHPphp bin/vm.php /tmp/impl_file.php# expect four [8192] Implicitly marking parameter … lines; today only "ok"'
Done when
File-level compile under PROFILE=8.4 emits the same four deprecations as Zend / as the existing eval compliance case
Compliance .phpt that loads a file (not only eval)
php script/bootstrap-inventory.php --check: construct-flag / file-list drift vs committed doc (not clean OK 4311/4311 — see Diff for SimpleXml/Compiler/JIT)
./script/release-readiness.sh --json: still running
File-level parseAndCompile runs before VM::running() is set. Wired Runtime's VMContext into Compiler so implicit-nullable E_DEPRECATED emits for main scripts (same path as eval/#21390).
Verification
PHP_COMPILER_PROFILE=8.4 php bin/vm.php -d error_reporting=E_ALL /tmp/impl_file.php
→ four PHP Deprecated lines + ok
./script/phpunit.sh --filter 'implicit_nullable_parameter'
→ OK (3 tests) including new file-level phpt
Note: guest DEFAULT_STARTUP_REPORTING still masks E_DEPRECATED (unlike Zend 8.4’s default E_ALL); enable via -d / PHPT --INI-- for main-file compile-time notices. Same-file set_error_handler does not catch these (Zend: stderr at compile time before handlers run).
Closed here after partial fix, but file-compile E_DEPRECATED under PROFILE=8.4 is still silent on current master. Active work: #23720 (re-#22987). Do not re-file — claim #23720 instead.
Activity
PurHur commentedon Jul 25, 2026
claim: Lane B implementer — starting this run
Trust gates (pre-claim):
php script/bootstrap-inventory.php --check: construct-flag / file-list drift vs committed doc (not clean OK 4311/4311 — see Diff for SimpleXml/Compiler/JIT)./script/release-readiness.sh --json: still runningLanguage: emit implicit-nullable E_DEPRECATED on file compile (#22987) (
PurHur commentedon Jul 25, 2026
Merged via #22991 (
33a34825)Fix
File-level
parseAndCompileruns beforeVM::running()is set. WiredRuntime'sVMContextintoCompilerso implicit-nullableE_DEPRECATEDemits for main scripts (same path as eval/#21390).Verification
Note: guest
DEFAULT_STARTUP_REPORTINGstill masksE_DEPRECATED(unlike Zend 8.4’s defaultE_ALL); enable via-d/ PHPT--INI--for main-file compile-time notices. Same-fileset_error_handlerdoes not catch these (Zend: stderr at compile time before handlers run).PurHur commentedon Jul 27, 2026
Cleanup (2026-07-27): re-open tracked in #23720
Closed here after partial fix, but file-compile
E_DEPRECATEDunderPROFILE=8.4is still silent on currentmaster. Active work: #23720 (re-#22987). Do not re-file — claim #23720 instead.