Skip to content

Use never return type in ThrowingSourceLocator#363

Merged
janedbal merged 1 commit into
masterfrom
throwing-source-locator-never
May 19, 2026
Merged

Use never return type in ThrowingSourceLocator#363
janedbal merged 1 commit into
masterfrom
throwing-source-locator-never

Conversation

@janedbal

Copy link
Copy Markdown
Member

Summary

  • Now that PHP < 8.1 is dropped (Drop support for PHP < 8.1 #361), : never is available, so the throw-only methods in ThrowingSourceLocator can use it.
  • Removes both @phpstan-ignore return.internalInterface annotations, the unused Reflection import, and the @return list<Reflection> PHPDoc.

Follow-up to discussion on #359.

Test plan

  • composer check:types
  • composer check:cs
  • composer check:ignores
  • PHPUnit suite

Co-Authored-By: Claude Code

Now that PHP < 8.1 is dropped, the throw-only methods can use `: never`,
which removes the need for the `return.internalInterface` ignores.

Co-Authored-By: Claude Code
@janedbal janedbal merged commit 9b87e45 into master May 19, 2026
22 checks passed
@janedbal janedbal deleted the throwing-source-locator-never branch May 19, 2026 14: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