A GitHub Action for running PHPStan static analysis in CI/CD workflows.
OskarStark/phpstan-ga is a GitHub Action that runs PHPStan static analysis on PHP code within GitHub workflows. It packages PHPStan in a Docker container to provide consistent, configurable code quality checks during continuous integration. The project solves the problem of manually setting up PHPStan in CI/CD pipelines by offering a drop-in solution.
PHP developers and teams using GitHub for version control who want to integrate automated static analysis into their CI/CD processes.
Developers choose this Action because it reduces configuration complexity, ensures consistent PHPStan execution via Docker, and provides flexibility through environment variables and command arguments. It's specifically optimized for GitHub's ecosystem.
GithubAction for PHPStan
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The README provides minimal YAML configuration, allowing setup with just a few lines of code in GitHub workflows, reducing initial overhead.
Uses a pre-built Docker image from Docker Hub to ensure PHPStan runs identically across all CI environments, mitigating environment-specific issues.
Supports command-line arguments for analysis level and paths, plus environment variables like REQUIRE_DEV and ALLOW_DEV for dependency handling, as shown in the README examples.
Automatically picks up phpstan.neon.dist files from the repository root, simplifying project-specific setups without extra configuration.
Requires Docker to run, which can add complexity, slower startup times, and may not be feasible in environments with strict container restrictions.
Tailored specifically for GitHub Actions, making it incompatible with other version control systems or CI platforms, limiting portability.
The README is concise and lacks detailed examples for edge cases, such as integrating PHPStan extensions or troubleshooting common errors, which might require external resources.