Skip to content
Run PHP Insights in Github Actions
Branch: master
Clone or download
Latest commit ed8f3a1 Jun 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Release v1.0.0 Jun 10, 2019
LICENSE Create LICENSE Jun 10, 2019 Update README Jun 10, 2019 Add Core Logic Jun 10, 2019


This GitHub Action executes phpinsights. The output of the Insights Command can be viewed in the Actions log.

You can optionally define minimum values for Insights categories. If the value falls below your given threshold, the run fails.

If you're using Laravel, there's also a framework specific Action available.


This Action doesn't install composer dependencies on it's own and doesn't contain a phpinsights binary.

It's therefore required that phpinsights is set as a dependency in your project and that another Action installs the composer dependencies.

An example Workflow can look like this.

workflow "phpinsights" {
  on = "push"
  resolves = [

action "composer install" {
  uses = "MilesChou/composer-action@master"
  args = "install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist"

action "phpinsights" {
  needs = ["composer install"]
  uses = "stefanzweifel/phpinsights-action@v1.0.0"


You can pass any valid phpinsights argument to the Action. In this example, all issues are always displayed and a minimum value of 80 has to be achieved in all categories.

action "phpinsights" {
  needs = ["composer install"]
  uses = "stefanzweifel/phpinsights-action@v1.0.0"
  args = "-v --min-quality=80 --min-complexity=80 --min-architecture=80 --min-style=80"


We use SemVer for versioning. For the versions available, see the tags on this repository.


This project is licensed under the MIT License - see the LICENSE file for details.

You can’t perform that action at this time.