{"id":18248228,"url":"https://github.com/district09/php_package_qa-php","last_synced_at":"2026-03-10T14:02:21.071Z","repository":{"id":41850446,"uuid":"319643269","full_name":"district09/php_package_qa-php","owner":"district09","description":"Set of Quality Assurance tools and configuration files for PHP projects and libraries.","archived":false,"fork":false,"pushed_at":"2025-07-15T11:20:13.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-10-14T11:50:47.688Z","etag":null,"topics":["d09check22","web"],"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/district09.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-08T13:14:31.000Z","updated_at":"2025-07-15T11:18:28.000Z","dependencies_parsed_at":"2024-11-05T09:38:18.304Z","dependency_job_id":"7b722373-7041-4ffb-9c0e-ffb839807d19","html_url":"https://github.com/district09/php_package_qa-php","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.5714285714285714,"last_synced_commit":"9c2758849ce68e64ca66ceb512d4c951d2e173f3"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/district09/php_package_qa-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fphp_package_qa-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fphp_package_qa-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fphp_package_qa-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fphp_package_qa-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/district09","download_url":"https://codeload.github.com/district09/php_package_qa-php/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fphp_package_qa-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30336065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["d09check22","web"],"created_at":"2024-11-05T09:36:17.887Z","updated_at":"2026-03-10T14:02:21.030Z","avatar_url":"https://github.com/district09.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quality Assurance - PHP\n\nThis package provides a set of Quality Assurance tools and configuration files\nfor PHP projects and packages (libraries).\n\n## Requirements\n\n* [Composer](https://getcomposer.org)\n\n## Installation\n\nAdd the `grumphp` entry to the `extra` section of your `composer.json`.\n\n```json\n\"grumphp\": {\n    \"config-default-path\": \"vendor/district09/qa-php/configs/grumphp.yml\"\n}\n```\n\nAdd the qa-php package as dev requirement:\n\n```bash\ncomposer require --dev district09/qa-php:^2.0\n```\n\n## Configuration\n\n### General\n\nIf required you can extend or override the provided configuration file of a\ntask. Simply create the matching configuration file in the root of your project.\n\nFor example, to override the provided `phpcs.xml` file you can either create a\n`phpcs.xml` or `phpcs.local.xml` file.\n\nNote that the `.local.` files should only be used for changes that shouldn't be\ncommitted. Exclude them in `.gitignore`:\n\n```gitignore\n/*.local.*\n```\n\nYaml and Neon files will extend (merged into) the provided configuration file by\ndefault. Create a `.env` or `.env.local` file and add following contents to\nchange this behaviour:\n\n```\n[FILENAME]_SKIP_[TYPE]=1\n```\n\nWherein `[FILENAME]` matches the configuration filename and `[TYPE]` is either:\n\n- `LOCAL` to skip for example your `phpstan.local.neon` file.\n- `PROJECT` to skip for example your `phpstan.neon` file.\n- `GLOBAL` to skip for example the by qa-php provided `phpstan.neon` file.\n\nOther file types cannot be merged and will just override all other less specific\nfiles.\n\n### PHPStan in deprecations only mode\n\nCreate a `phpstan.neon` file and add following contents to ignore everything\nexcept deprecations:\n\n```\nparameters:\n  customRulesetUsed: true\n  ignoreErrors:\n    - '#^(?:(?!deprecated).)*$#'\n```\n\n### Ignore automatically created config files\n\nSome GrumPHP tasks require a config file. These are automatically created, from\nthe examples within vendor/qa-php/config or by the project specific files within\nyour project or package root directory. The generated files are also stored in\nthe same project/package root. You can recognize these files by the `.qa-php.`\nsuffix.\n\n**These files should not be committed!** Add them to the `.gitignore` file:\n\n```gitignore\n/*.qa-php.*\n```\n\n### Ignore PHPUnit build files\n\nWhen the PHPUnit task runs, coverage report files are stored into the `build`\ndirectory located in the root of your project. Add this file to the `.gitignore`\nfile:\n\n```gitignore\n/build\n/.phpunit.result.cache\n```\n\n### Run PHPUnit locally without coverage\n\nRunning PHPUnit with coverage report is time consuming. You can locally speed up\nPHPUnit by copying the generated `phpunit.qa-php.xml` file to\n`phpunit.local.xml` and remove the `\u003ccoverage\u003e` section from it.\n\n## Run GrumPHP\n\nGrumPHP will automatically run all tasks on the changed code on git commit and\npush.\n\nYou can run all tasks at once:\n\n```bash\nvendor/bin/grumphp\n```\n\nOr you can run one or more specific tasks manually by running:\n\n```bash\nvendor/bin/grumphp --tasks phpcs,phpmd\nvendor/bin/grumphp --tasks phpunit\n```\n\n## PHPStorm\n\nPHPStorm requires config files for PHP_CodeSniffer, PHP Mess Detector \u0026 PhpUnit.\nRun the grumphp command at least once (successfully) to generate these files.\n\nThe files will be created as:\n\n- `phpcs.qa-php.xml` : PHP_CodeSniffer config file.\n- `phpmd.qa-php.xml` : PHP Mess Detector config file.\n- `phpunit.qa-php.xml` : PHPUnit config file.\n\nConfigure the paths to these files in PHPStorm:\n\n* Editor \u003e Inspections \u003e PHP \u003e Quality tools \u003e PHP Mess Detector validation\n  Add `phpmd.qa-php.xml` to the \"Custom rulesets\".\n* Editor \u003e Inspections \u003e PHP \u003e Quality tools \u003e PHP_CodeSniffer validation\n  Set \"Coding Standard\" to \"Custom\" and set the path to `phpcs.qa-php.xml`.\n* Languages \u0026 Frameworks \u003e PHP \u003e Test Frameworks \u003e Test Runner\n  Set \"Default configuration file\" to `phpunit.qa-php.xml`.\n\n### PHP compatibility\n\nIn order to check php compatibility you can use the phpcs `PHPCompatibility` sniff:\n\n```bash\nphp vendor/bin/phpcs -p --ignore=\"*/vendor/*\" --extensions=php,inc,module,install,theme --runtime-set testVersion 8.1 --standard=PHPCompatibility ./\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrict09%2Fphp_package_qa-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistrict09%2Fphp_package_qa-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrict09%2Fphp_package_qa-php/lists"}