{"id":23709910,"url":"https://github.com/nxtlvlsoftware/run-phpstan-pmmp-action","last_synced_at":"2026-02-06T10:30:22.196Z","repository":{"id":50310001,"uuid":"518680277","full_name":"NxtLvLSoftware/run-phpstan-pmmp-action","owner":"NxtLvLSoftware","description":"GitHub action for running PHPStan analysis against PocketMine-MP plugins and libraries in workflows.","archived":false,"fork":false,"pushed_at":"2023-01-30T18:23:37.000Z","size":29,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T22:18:27.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NxtLvLSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-28T02:56:16.000Z","updated_at":"2023-05-23T15:59:00.000Z","dependencies_parsed_at":"2023-02-14T05:16:09.170Z","dependency_job_id":null,"html_url":"https://github.com/NxtLvLSoftware/run-phpstan-pmmp-action","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Frun-phpstan-pmmp-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Frun-phpstan-pmmp-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Frun-phpstan-pmmp-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Frun-phpstan-pmmp-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NxtLvLSoftware","download_url":"https://codeload.github.com/NxtLvLSoftware/run-phpstan-pmmp-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793637,"owners_count":19698027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-30T18:58:54.107Z","updated_at":"2026-02-06T10:30:22.153Z","avatar_url":"https://github.com/NxtLvLSoftware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Action nxtlvlsoftware/run-phpstan-pmmp-action\n\nGitHub action for running [PHPStan](https://github.com/phpstan/phpstan) analysis against [PocketMine-MP](https://github/pmmp/PocketMine-MP)\nplugins and libraries in actions workflows. [See setup-pmmp-phpstan-env-action](https://github.com/NxtLvLSoftware/setup-pmmp-phpstan-env-action) for descriptions on provided phpstan.neon configurations.\n\n| Action Input    | Required | Default                                  | Description                                                                                                                                                                                              |\n|-----------------|----------|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| php-version     | false    | 8.1.14                                   | Specifies the version of php to use. We try to keep the default up-to-date with PocketMine. Pull Requests welcome.                                                                                       |\n| phpstan-version | false    | 1.9.13                                   | Specifies the version of phpstan to use. We try to keep the default up-to-date with PocketMine. Pull Requests welcome.                                                                                   |\n| pmmp-version    | false    | latest                                   | Specifies the version of pmmp to use. Will use the latest available release by default. You should keep this locked to the API version in your plugin.yml as any non-stable release could be downloaded. |\n| pmmp-source-dir | false    | ./pocketmine                             | Specifies the directory to install PocketMine sources and default phpstan.neon configs to.                                                                                                               |\n| memory-limit    | false    | 1G                                       | Specifies the memory limit in the same format php.ini accepts.                                                                                                                                           |\n| analyse         | false    | undefined                                | A space seperated list of paths to analyse. Providing paths here will override any paths specified in phpstan.neon files. (https://phpstan.org/config-reference#analysed-files)                          |\n| level           | false    | 9                                        | Specifies the rule level to run (1-9). https://phpstan.org/user-guide/rule-levels                                                                                                                        |\n| config          | false    | ./pocketmine/phpstan/phpstan.neon.dist   | Path to a phpstan.neon configuration file.                                                                                                                                                               |\n| no-progress     | false    | true                                     | Turns off the progress bar.                                                                                                                                                                              |\n| debug           | false    |                                          | Instead of the progress bar, it outputs lines with each analysed file before its analysis.                                                                                                               |\n| quiet           | false    |                                          | Silences all the output. Useful if you’re interested only in the exit code.                                                                                                                              |\n| autoload-file   | false    | ./pocketmine/phpstan/vendor/autoload.php | If your application uses a custom autoloader, you should set it up and register in a PHP file that is passed to this CLI option. Relative paths are resolved based on the current working directory.     |\n| error-format    | false    | github                                   | Specifies a custom error formatter. https://phpstan.org/user-guide/output-format                                                                                                                         |\n| ansi            | false    |                                          | Overrides the auto-detection of whether colors should be used in the output and how nice the progress bar should be.                                                                                     |\n| xdebug          | false    |                                          | PHPStan turns off XDebug if it’s enabled to achieve better performance.                                                                                                                                  |\n\n## How to use\n\nSimple analysis of PocketMine plugins and libraries on GitHub Actions:\n\n```yml\nname: My PMMP Plugin Workflow\non: [ push ]\njobs:\n  test-code:\n    name: Run Plugin Tests\n    runs-on: ubuntu-20.04 # pmmp-php-build doesn't work on ubuntu-latest yet\n    steps:\n      - name: Checkout source code\n        uses: actions/checkout@v3\n      - name: Run PHPStan\n        uses: nxtlvlsoftware/run-phpstan-pmmp-action@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nThis example will run the analysis with the default settings against any code in the `src` directory. We aim to keep the\ndefault phpstan version in-sync with whatever PocketMine is currently using, pull requests are welcome to maintain this.\n\nForwarding the `$GIHUB_TOKEN` environment variable is required to properly configure PocketMine and PHPStan as we\ninteract with the GitHub API to fetch version information.\n\nOr to lock the versions of any required tools/executables to known versions:\n\n```yml\nname: My PMMP Plugin Workflow\non: [ push ]\njobs:\n  test-code:\n    name: Run Plugin Tests\n    runs-on: ubuntu-20.04 # pmmp-php-build doesn't work on ubuntu-latest yet\n    steps:\n      - name: Checkout source code\n        uses: actions/checkout@v3\n      - uses: nxtlvlsoftware/run-phpstan-pmmp-action@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          analyse: src\n          config: tests/phpstan/action.phpstan.neon\n          level: 9\n          php-version: 8.0.18\n          phpstan-version: 1.8.2\n          pmmp-version: 4.6.1\n```\n\n## License\n`nxtlvlsoftware/run-phpstan-pmmp-action` is open-sourced software licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxtlvlsoftware%2Frun-phpstan-pmmp-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxtlvlsoftware%2Frun-phpstan-pmmp-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxtlvlsoftware%2Frun-phpstan-pmmp-action/lists"}