Skip to content

Make EmptyResponse::create() content explicitly nullable - #5

Merged
TomK merged 1 commit into
mainfrom
php85-deprecations
Oct 22, 2026
Merged

TomK merged 1 commit into
mainfrom
php85-deprecations

Conversation

@TomK

@TomK TomK commented Oct 22, 2026

Copy link
Copy Markdown
Member

On PHP 8.4+, loading EmptyResponse raises EmptyResponse::create(): Implicitly marking parameter $content as nullable is deprecated, so every k4 service that uses it logs the notice. It's the only PHP 8.5 deprecation in c4 and one of two left in k4's vendor tree after updating.

  • EmptyResponse::create(): ?string $content = null; no deprecation, same behaviour.

Adds GitHub Actions on PHP 8.2–8.5, with phpunit failing on deprecations.

Test plan

  • With failOnDeprecation on, the suite reported the deprecation on PHP 8.5 before the fix; all 10 tests pass on PHP 8.2 and 8.5 after it.

🤖 Generated with Claude Code

PHP 8.4 deprecates implicitly nullable parameters, and the notice is
raised when the class is compiled, so every k4 service that loads
EmptyResponse logged it on PHP 8.4+.

phpunit now fails on deprecations, and GitHub Actions runs the suite on
PHP 8.2-8.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomK
TomK merged commit 876146d into main Oct 22, 2026
4 checks passed
@TomK
TomK deleted the php85-deprecations branch October 22, 2026 12:20
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