Skip to content

Fix PHP 8.4 deprecation warnings for implicitly nullable parameters #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

JanTvrdik
Copy link
Contributor

Summary

  • Fixed PHP 8.4 deprecation warnings in Container.stub and Selection.stub
  • Made implicitly nullable parameters explicitly nullable:
    • Container::getComponents(): string $filterType = null?string $filterType = null
    • Selection::limit(): int $offset = null?int $offset = null

Test plan

  • All tests pass (PHPUnit: 60/60 tests, 9 skipped)
  • PHPStan analysis passes with no errors
  • Code style checks pass
  • Lint checks pass

🤖 Generated with Claude Code

- Container.stub: Make $filterType explicitly nullable (?string)
- Selection.stub: Make $offset explicitly nullable (?int)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ondrejmirtes ondrejmirtes merged commit 9b62986 into phpstan:2.0.x Jun 17, 2025
31 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@JanTvrdik JanTvrdik deleted the fix-php84-deprecations branch June 17, 2025 13: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.

2 participants