{"id":14110418,"url":"https://github.com/php-actions/phpstan","last_synced_at":"2025-04-06T07:14:06.708Z","repository":{"id":44535913,"uuid":"294987104","full_name":"php-actions/phpstan","owner":"php-actions","description":"PHP Static Analysis in Github Actions.","archived":false,"fork":false,"pushed_at":"2023-05-03T08:10:15.000Z","size":76,"stargazers_count":64,"open_issues_count":6,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-27T19:35:09.162Z","etag":null,"topics":["continuous-integration","php","phpstan","quality-assurance","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["g105b"]}},"created_at":"2020-09-12T16:54:51.000Z","updated_at":"2024-04-16T14:31:07.000Z","dependencies_parsed_at":"2024-01-29T06:12:58.772Z","dependency_job_id":"46a80e86-1c6e-4003-a6f7-3c70c3fb4268","html_url":"https://github.com/php-actions/phpstan","commit_stats":{"total_commits":55,"total_committers":5,"mean_commits":11.0,"dds":"0.10909090909090913","last_synced_commit":"76a00bb9ece115569bf42d3f2c044d2afb21729e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphpstan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphpstan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphpstan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphpstan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-actions","download_url":"https://codeload.github.com/php-actions/phpstan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445680,"owners_count":20939961,"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":["continuous-integration","php","phpstan","quality-assurance","static-analysis"],"created_at":"2024-08-14T10:02:50.676Z","updated_at":"2025-04-06T07:14:06.674Z","avatar_url":"https://github.com/php-actions.png","language":"Shell","funding_links":["https://github.com/sponsors/g105b"],"categories":["Shell"],"sub_categories":[],"readme":"\u003cimg src=\"http://159.65.210.101/php-actions.png\" align=\"right\" alt=\"PHP Static Analysis in Github Actions\" /\u003e\n\n PHP Static Analysis in Github Actions. \n ======================================\n\nPHPStan finds bugs in your code without writing tests by using runnin static analysis on your project's code.\n\nUsage\n-----\n\nCreate your Github Workflow configuration in `.github/workflows/ci.yml` or similar.\n\n```yaml\nname: CI\n\non: [push]\n\njobs:\n  build-test:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v3\n    - uses: php-actions/composer@v6 # or alternative dependency management\n    - uses: php-actions/phpstan@v3\n      with:\n        path: src/\n\n    # ... then your own project steps ...\n```\n\n### Version numbers\n\nThis action is released with semantic version numbers, but also tagged so the latest major release's tag always points to the latest release within the matching major version.\n\nPlease feel free to use `uses: php-actions/phpstan@v3` to always run the latest version of v3, or `uses: php-actions/phpstan@v3.0.0` to specify the exact release.\n\nExample\n-------\n\nWe've put together an extremely simple example application that uses `php-actions/phpstan`. Check it out here: https://github.com/php-actions/example-phpstan.\n\nInputs\n------\n\nThe following configuration options are available:\n\n+ `version` The version of PHPStan to use e.g. `9`, `9.5.0`, `latest` or `composer` (default: `composer` will use the version in your `vendor/bin` directory)\n+ `php_version` The version of PHP to use e.g. `7.4` (default: latest)\n+ `php_extensions` Space-separated list of extensions using [php-build][php-build] e.g. `xdebug mbstring` (default: N/A)\n+ `vendored_phpstan_path` The path to a phar file already present on the runner (default: N/A)\n+ `command` The command to run e.g. `list` or `worker` (default: analyse)\n+ `path` Path(s) with source code to run analysis on, space-separated (required)\n+ `configuration` Configuration file location\n+ `level` Level of rule options - the higher, the stricter\n+ `paths_file` Path to a file with a list of paths to run analysis on\n+ `autoload_file` Project's additional autoload file path\n+ `error_format` Format in which to print the result of the analysis\n+ `generate_baseline` Path to a file where the baseline should be saved\n+ `memory_limit` Memory limit for analysis\n+ `args` Extra arguments to pass to the phpstan binary\n\nBy default, adding - uses: php-actions/phpstan@v2 into your workflow will run `phpstan analyse`, as `analyse` is the default command name.\n\nYou can issue custom commands by passing a command input, like so:\n\n```yaml\njobs:\n  phpstan:\n\n    ...\n\n    - name: PHPStan\n      uses: php-actions/phpstan@v3\n      with:\n        command: your-command-here\n```\n\nThe syntax for passing in a custom input is the following:\n\n```yaml\n...\n\njobs:\n  phpstan:\n\n    ...\n\n    - name: PHPStan Static Analysis\n      uses: php-actions/phpstan@v3\n      with:\n        configuration: custom/path/to/phpstan.neon\n        memory_limit: 256M\n```\n\nIf you require other configurations of phpstan, please request them in the [Github issue tracker](https://github.com/php-actions/phpstan/issues)\n\nPHP and PHPStan versions\n------------------------\n\nIt's possible to run any version of PHPStan under any version of PHP, with any PHP extensions you require. This is configured with the following inputs:\n\n+ `version` - the version number of PHPStan to run e.g. `1.10.14` (default: `composer`)\n+ `php_version` - the version number of PHP to use e.g. `8.1` (default: `latest`)\n+ `php_extensions` - a space-separated list of extensions to install using [php-build][php-build] e.g. `xdebug mbstring` (default: N/A)\n\nIf you require a specific version combination that is not compatible with Github Actions for some reason, please make a request in the [Github issue tracker][issues].\n\n***\n\nIf you found this repository helpful, please consider [sponsoring the developer][sponsor].\n\n[php-build]: https://github.com/php-actions/php-build\n[issues]: https://github.com/php-actions/phpstan/issues\n[sponsor]: https://github.com/sponsors/g105b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-actions%2Fphpstan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-actions%2Fphpstan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-actions%2Fphpstan/lists"}