{"id":20313925,"url":"https://github.com/craftcms/phpstan","last_synced_at":"2025-03-04T08:41:18.497Z","repository":{"id":56958620,"uuid":"466124694","full_name":"craftcms/phpstan","owner":"craftcms","description":"PHPStan configuration for Craft CMS projects.","archived":false,"fork":false,"pushed_at":"2022-04-12T20:50:23.000Z","size":6,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-14T06:09:46.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/craftcms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-04T13:01:10.000Z","updated_at":"2023-10-22T23:53:57.000Z","dependencies_parsed_at":"2022-08-21T08:50:57.575Z","dependency_job_id":null,"html_url":"https://github.com/craftcms/phpstan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fphpstan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fphpstan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fphpstan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fphpstan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftcms","download_url":"https://codeload.github.com/craftcms/phpstan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818734,"owners_count":20025205,"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-11-14T18:13:29.836Z","updated_at":"2025-03-04T08:41:18.468Z","avatar_url":"https://github.com/craftcms.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHPStan config for Craft CMS\n\nThis package provides a base [PHPStan](https://github.com/phpstan/phpstan) configuration for Craft CMS plugins and projects.\n\nTo install, run the following commands within your plugin or project:\n\n```sh\ncomposer config minimum-stability dev\n```\n\n```sh\ncomposer config prefer-stable true\n```\n\n```sh\ncomposer require craftcms/phpstan:dev-main --dev\n```\n\nThen add a `phpstan.neon` config file to the root of your project:\n\n```neon\nincludes:\n    - vendor/craftcms/phpstan/phpstan.neon\n\nparameters:\n    level: 0\n    paths:\n        - src\n```\n\nChange the `paths` array to whichever directory(s) contain the source code you want PHPStan to inspect.\n\n(See PHPStan’s [Config Reference](https://phpstan.org/config-reference) for a full list of supported config parameters.)\n\nWith that in place, you can begin running PHPStan with the following command:\n\n```sh\nvendor/bin/phpstan --memory-limit=1G\n```\n\nOr define a `phpstan` script in `composer.json`:\n\n```json\n{\n  \"...\": \"...\",\n  \"scripts\": {\n    \"phpstan\": \"phpstan --memory-limit=1G\"\n  }\n}\n```\n\nAnd then run PHPStan with:\n\n```sh\ncomposer run-script phpstan\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fphpstan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftcms%2Fphpstan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fphpstan/lists"}