Skip to content

Language: CompileFatal shape for null-default typed property (#31820 follow-up) - #31829

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-31820-null-default-typed-prop-msg
Aug 17, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-31820-null-default-typed-prop-msg

Conversation

@PurHur

@PurHur PurHur commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Related: #31820 (already closed by #31827)

Test plan

  • ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_null_default_typed_prop.php' → exit 255, PHP Fatal error: … Use the nullable type ?int …
  • ./script/phpunit.sh --filter TypedPropNullDefaultFatal31820 → OK (4 tests)

Verification

PHP Fatal error:  Default value for property of type int may not be null. Use the nullable type ?int to allow null default value in …/maintainer_gap_null_default_typed_prop.php on line 4
EXIT:255
OK (4 tests, 6 assertions)

…ollow-up)

#31827 matched Zend’s message text but still printed parseAndCompile failure.
Pass property source location so CLI shows PHP Fatal error: like zend_compile.c.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-31820-null-default-typed-prop-msg branch from eacc2dd to c0e91b1 Compare August 17, 2026 04:45
@PurHur PurHur changed the title Language: Zend fatal for null default on non-nullable typed properties (#31820) Language: CompileFatal shape for null-default typed property (#31820 follow-up) Aug 17, 2026
@PurHur
PurHur merged commit ae8758d into master Aug 17, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-31820-null-default-typed-prop-msg branch August 17, 2026 04:45
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