Skip to content

Improve type safety and code quality #685

@curry684

Description

@curry684

Following up on the excellent work by @DannyvdSluijs in #672:

I did some testing because of my other 2 PR's regarding type safety, and it's actually pretty easy to bring the project to level 7 or even 8 in PHPstan. However, to do it right it would require breaking signatures by adding return types and parameter types. This would break B/C and therefore require a new major version be released. I think this would also be a good moment to:

  • Upgrade minimum PHP to 8.2 (older are all EOL next month)
  • This could potentially also be the opportune moment to remove the hard dependency on Guzzle as per PSR 18 compatibility #632 if feasible and switch to psr/http-client-implementation instead (most Symfony projects use the Symfony HTTP client nowadays)

If not we can still do a lot, but we'd be using phpdoc annotations mostly.

What are maintainer ideas on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions