Skip to content

Use PHPStan 2.2#99

Merged
spaze merged 3 commits into
mainfrom
spaze/new-phpstan
May 29, 2026
Merged

Use PHPStan 2.2#99
spaze merged 3 commits into
mainfrom
spaze/new-phpstan

Conversation

@spaze

@spaze spaze commented May 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

@spaze spaze self-assigned this May 29, 2026
Copilot AI review requested due to automatic review settings May 29, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the development tooling to use PHPStan 2.2 and adjusts code/tests to satisfy the updated static analysis behavior.

Changes:

  • Bumps phpstan/phpstan from ^2.1.47 to ^2.2.1.
  • Removes now-unnecessary casts/checks around values PHPStan can infer more precisely.
  • Updates the Psalm baseline after removing a redundant null check.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
composer.json Updates the PHPStan development dependency constraint.
src/Fields/SecurityTxtExpiresFactory.php Uses DateInterval::days directly when constructing expiration metadata.
tests/Fields/SecurityTxtExpiresTest.phpt Mirrors the factory logic in the test helper setup.
src/Fetcher/SecurityTxtFetcher.php Removes an unreachable defensive null check.
psalm-baseline.xml Removes the baseline entry for the deleted redundant condition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spaze spaze merged commit 8b9467f into main May 29, 2026
7 checks passed
@spaze spaze deleted the spaze/new-phpstan branch May 29, 2026 16:02
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