Skip to content

PHPStan level 8 compliance #312

Description

@somethingwithproof

Goal

Bring plugin_mactrack to PHPStan level 8 with zero errors.

What level 8 adds (cumulative with 0–7)

  • Level 8: Return types, types assigned to properties
  • Level 7: Basic dead code checking (always false instanceof, dead else, unreachable code)
  • Level 6: Checking types of arguments passed to methods and functions
  • Level 5: Report missing type hints
  • Levels 0–4: Union types, nullable access, mixed strictness, etc.

Tasks

  • Achieve PHPStan level 6 first (PHPStan level 6 compliance #311)
  • Add explicit return types to all methods
  • Add property type declarations
  • Fix dead code (unreachable branches, always-false checks)
  • Update config to level: 8
  • Run vendor/bin/phpstan analyse -l 8 with zero errors

Reference

Related

Activity

  1. changed the title [-]PHP 8 compatibility (PHP 8.0+)[/-] [+]PHPStan level 8 compliance[/+] on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions