Skip to content

Conversation

@akrabat
Copy link
Member

@akrabat akrabat commented Nov 2, 2025

Fix issues found:

  • Define the type of the bodyParsers array.
  • Type hint the input to a body parser to string as that's what it always is.
  • ServerRequest::getQueryParams() always returns an array, so we don't need to test for it.
  • Ensure that the uri key in the file metadata is a string before using it.

@akrabat akrabat requested a review from odan November 2, 2025 15:32
@coveralls
Copy link

coveralls commented Nov 2, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 0aa8ccc on akrabat:phpstan2
into fd26ab6 on slimphp:main.

@akrabat akrabat force-pushed the phpstan2 branch 2 times, most recently from da09e61 to 4441831 Compare November 2, 2025 15:42
Fix issues found:
- Define the type of the bodyParsers array.
- Type hint the input to a body parser to string as that's what it
  always is.
- ServerRequest::getQueryParams() always returns an array, so we don't
  need to test for it.
- Ensure that the uri key in the file metadata is a string before using
  it.

Remove tests for string and use a type hint
@odan odan merged commit 0583b77 into slimphp:main Nov 6, 2025
7 checks passed
@akrabat akrabat added this to the 1.5.0 milestone Nov 6, 2025
@akrabat akrabat deleted the phpstan2 branch November 12, 2025 19:01
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.

3 participants