Skip to content

Add PHPStan for a little sanity - Good first issue #428

Open

Description

@mhsdesign

I wondered how we still stumble on runtime bugs like these #427 that are totally unavoidable when using static analysis.

    "scripts": {
        "lint:phpstan": "../../../bin/phpstan analyse --level 8 Classes"
    },

I would have commited that already and added it to the CI if it werent for the "195 errors" ... even level 4 reports ~100 errors so i think this package is due to become a little safer.

Activity

  1. changed the title [-]Add PHPStan for a little sanity[/-] on Jul 7, 2026
  2. anikosom commented on Sep 24, 2026

    @anikosom

    Hi! I'd like to work on this.
    My plan would be to start with a small PR that adds PHPStan (config + composer script + CI step) together with a baseline for the existing errors, so CI can catch new issues right away. Then I'd fix the baselined errors in smaller follow-up PRs, grouped by error type.
    Which level would you like to target, and which branch should I base this on?
    Also, should I prefer PHPDoc types over native types in public methods to avoid breaking changes for classes extending them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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