Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Analyzer (PHPStan) Integration #671

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Apr 22, 2024

  1. Composer: Install PHPStan as dev-dependency

    Specifically that is
    - phpstan/phpstan - the linter itself
    - phpstan/extension-installer - convenience package for loading extensions
    - spaze/phpstan-disallowed-calls - an extension that checks for some additional flaws
    UlrichEckhardt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    3bb9727 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d013f1 View commit details
    Browse the repository at this point in the history
  3. PHPStan: Add baseline

    The baseline lists the existing flaws that were found. This has two uses:
    - We can use a high sensitivity for scanning, without having to fix all
      issues right away.
    - It still prevents new issues from coming up and also tracks resolved
      issues.
    UlrichEckhardt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    be06610 View commit details
    Browse the repository at this point in the history
  4. Github: Run PHPStan as action on every push

    This should prevent regressions in code flaws detected by PHPStan. Also,
    PHPStan complains when the baseline is not advanced after fixing a flaw.
    This should prevent a flaw from reappearing later on.
    UlrichEckhardt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    fe68a1a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e701ccb View commit details
    Browse the repository at this point in the history