haspadar/piqule

Quality checks for PHP projects

Maintainers

Package info

github.com/haspadar/piqule

pkg:composer/haspadar/piqule

Statistics

Installs: 7 840

Dependents: 2

Suggesters: 0

Stars: 3

Open Issues: 5

v0.27.2 2026-04-23 21:23 UTC

This package is auto-updated.

Last update: 2026-04-26 15:17:00 UTC


README

CI Coverage Mutation testing badge PHPStan Level Psalm CodeRabbit Pull Request Reviews

Quality checks for PHP projects.

Installed via Composer.
Executed locally, in Git hooks, or in CI.

Installation

composer require --dev haspadar/piqule
vendor/bin/piqule sync

Configure

Customization is optional. If needed, create .piqule.yaml in the project root.

Use append to add values to default lists — changes to php.src cascade to all PHP analysis tools, changes to exclude cascade to all tools:

append:
    php.src:
        - lib
    exclude:
        - legacy

Use override to replace individual keys:

override:
    phpstan.level: 8
    php.versions: ["8.3", "8.4", "8.5"]
    ci.pr.max_lines_changed: 400

Use php_cs_fixer.extend and phpcs.extend to inject native-syntax fragments at the end of the generated config. Useful when a built-in rule clashes with project code — for example, narrowing phpdoc_types instead of disabling it entirely:

override:
    php_cs_fixer.extend: "        'phpdoc_types' => ['exclude' => ['scalar']],"
    phpcs.extend: "    <rule ref=\"Foo.Bar\"><severity>0</severity></rule>"

The value is passed through verbatim; piqule does not parse it. Use a YAML block scalar (| or |-) for multi-line fragments.

Use envs to export environment variables in CI workflows. Each value is a shell command evaluated at runtime:

envs:
    COMPOSER_ROOT_VERSION: "git describe --tags --abbrev=0 | sed 's/^v//'"

The full list of available keys and their defaults is generated to .piqule/config.yaml on every piqule sync.

.piqule/ and .github/ are generated by piqule sync and may be safely deleted.

Workflow

To change configuration:

  1. Edit .piqule.yaml
  2. Run vendor/bin/piqule sync

Do not edit .piqule/ or the GitHub workflow file .github/workflows/piqule.yml directly — they are generated and will be overwritten.

Commands

  • piqule sync — generate configuration from templates
  • piqule check — run checks, excluding slow ones by default (check.slow: infection, sonar)
  • piqule check <tool> — run specific tool
  • -f, --full — include slow checks (default: check.full)
  • -F, --no-full — exclude slow checks
  • -p, --parallel — run checks concurrently (default: check.parallel)
  • -P, --no-parallel — force sequential execution
  • -v, --verbose — show full output from each check
  • piqule fix — run auto-fixable tools
  • piqule fix <tool> — run specific fixer

Checks

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Ensure all checks pass
  4. Open a pull request

All pull requests must pass CI before merging.

License

MIT