haspadar / piqule
Static analysis and linters for PHP projects
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/haspadar/piqule
Requires
- php: >=8.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.91
- infection/infection: ^0.32.0
- phpmd/phpmd: ^2.15
- phpmetrics/phpmetrics: ^2.9
- phpstan/phpstan: ^2.1
- phpunit/phpunit: >=11.5 <12.0
- vimeo/psalm: ^6.14
- dev-main
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.1
- v0.1.0
- dev-fix/dockerfile-location
- dev-fix/pmd-cpd-input-name
- dev-feature/managed-dockerfile
- dev-fix/project-root-resolution
- dev-fix/bin-autoload-bootstrap
- dev-chore/remove-ast-metrics
- dev-ci/phpmetrics
- dev-feature/add-phpmetrics-gate
- dev-feature/phpmetrics
- dev-refactor/split-sync-cli
- dev-feature/add-pmd-cpd
- dev-ci/ast-metrics-ci-mode
- dev-refactor/docker-remove-composer
- dev-fix/dockerfile-toolchain
- dev-refactor/piqule-config-layout
- dev-chore/ci-fix-yamllint-comments
- dev-feature/phpmd
- dev-feature/ast-metrics-ci
- dev-feature/phpmetrics-support
- dev-docs/update-readme-sync-model
- dev-docs/add-psalm-badge
- dev-feature/add-psalm
- dev-feature/phpstan
- dev-refactor/infra-piqule-layout
- dev-fix/ci-stryker-dashboard-secret
- dev-chore/ci-infection
- dev-chore/docker-hardening
- dev-ci/add-infection
- dev-fix/ci-user-controlled-run
- dev-chore/ci-pin-actions
- dev-refactor/remove-unreachable-paths
- dev-chore/path-coverage-ci
- dev-refactor/extract-tests-workflow
- dev-refactor/hadolint-remove-inputs
- dev-docs/add-readme-badges
- dev-fix/codecov-coverage-path
- dev-ci/add-codecov
- dev-fix/phpunit-version-constraint
- dev-test/unit-output
- dev-test/integration-file-and-console
- dev-refactor/target-interface-cleanup
- dev-test/disk-target-storage
- dev-test/synchronization-integration
- dev-refactor/test-suites-structure
- dev-test/dry-run-target-storage
- dev-refactor/composer-path-resolution
- dev-test/dry-run-notice-command
- dev-test/synchronization-command
- dev-refactor/cli-normalize-arguments
- dev-test/phpunit-setup
- dev-docs/readme
- dev-feature/dry-run
- dev-refactor/remove-target-states
- dev-refactor/materialization-without-project-snapshot
- dev-refactor/unify-sync-command
- dev-refactor/target-states
- dev-refactor/domain-naming-alignment
- dev-feature/hashes-snapshot-integration
- dev-refactor/hashes
- dev-refactor/rename-lock-to-snapshot
- dev-refactor/snapshot-interface
- dev-refactor/registry-lock
- dev-feat/github-workflows-templates
- dev-feature/synchronization
- dev-fix/init-lock-remember
- dev-refactor/piqule-directory-and-lock
- dev-refactor/project-piqule-directory-and-lock
- dev-refactor/remove-states
- dev-refactor/target-materialization
- dev-feature/target-state
- dev-feature/step-scenario
- dev-refactor/source-file-infrastructure
- dev-refactor/output-text-line
- dev-refactor/project-move-init-update-logic
- dev-refactor/project-state-and-source-target
- dev-refactor/run-context-cli
- dev-refactor/step-based-init
- dev-refactor/source-target-directories
- dev-refactor/filesystem-model
- dev-refactor/prepare-copytemplates-for-lock
- dev-refactor/remove-command-interface
- dev-feat/copy-templates
- dev-feat/init-command
- dev-feat/cli-entrypoint
- dev-feat/output-core
- dev-feat/output-ansi-colors
- dev-feat/command-scenarios
- dev-feat/project-structure
- dev-feat/filesystem-abstraction
- dev-feat/output-line-model
- dev-chore/disable-not-operator-successor-space
- dev-chore/introduce-templates-directory
- dev-chore/adjust-renovate-schedule
- dev-ci/refine-renovate-managers
- dev-ci/cleanup-renovate-config
- dev-ci/fix-renovate-config
- dev-ci/renovate-config-fix
- dev-ci/fix-markdownlint-regex-manager
- dev-ci/fix-registry-aliases
- dev-chore/cleanup-renovate-migration
- dev-ci/move-renovate-config
- dev-ci/fix-renovate-repositories
- dev-chore/renovate-hourly
- dev-chore/renovate-hourly-0
- dev-chore/renovate-hourly-30
- dev-chore/renovate-hourly-20
- dev-ci/hourly-renovate-schedule
- dev-ci/update-config-paths
- dev-ci/add-default-configs
- dev-ci/migrate-to-local-workflows
- dev-ci/remote-workflows
- dev-ci/renovate-docker-upgrades
- dev-ci/populate-ci-dockerfile
- dev-ci/add-hadolint-workflow
- dev-ci/docker-integration
- dev-refactor/workflows-single-ci
- dev-ci/pr-size-checker-integration
- dev-fix/renovate-with-token
- dev-fix/renovate-token
- dev-ci/renovate-integration
- dev-ci/typos-integration
- dev-ci/hadolint-integration
- dev-ci/integrate-markdownlint
- dev-ci/integrate-actionlint
- dev-feat/actionlint
- dev-feat/markdownlint-config
- dev-chore/remove-spdx
- dev-docs/update-readme-config-example
- dev-fix/composer-lock-php82
- dev-feat/php-cs-fixer-workflow
- dev-feat/composer-autoload
This package is auto-updated.
Last update: 2026-01-08 10:09:37 UTC
README
Piqule provides a distribution of PHP quality policies.
It delivers predefined static analysis rules, CI workflows, and tooling configurations by copying them into project repositories.
Piqule defines a single source of truth for quality policies; conflicts and deviations are resolved explicitly through Git.
Tooling overview
| Tool | Purpose | What Piqule provides |
|---|---|---|
| PHPStan | Static analysis | Strict ruleset and high analysis level |
| Psalm | Static analysis | Complementary checks and early error detection |
| PHP-CS-Fixer | Code style | Deterministic formatting rules |
| PHPMD | Numeric metrics | Size and complexity thresholds (methods, classes) |
| PMD (CPD) | Duplication detection | Copy-paste / duplicated code detection |
| Infection | Mutation testing | Test quality validation |
| Markdownlint | Markdown linting | Consistent documentation style |
| Hadolint | Dockerfile linting | Secure and reproducible Dockerfiles |
| Actionlint | CI linting | GitHub Actions correctness |
| Yamllint | YAML linting | Configuration consistency |
| Typos | Spell checking | Low-noise typo detection |
| Renovate | Dependency automation | Managed dependency update rules |
| PR Size Checker | Process guard | Pull request reviewability enforcement |
Installation
Piqule defines quality policies and configuration files. Actual analysis tools are installed explicitly per project.
1) Install Piqule
composer require --dev haspadar/piqule
2) Install PHP analysis tools
composer require --dev \ friendsofphp/php-cs-fixer \ phpunit/phpunit \ phpstan/phpstan \ vimeo/psalm \ phpmd/phpmd \ phpmetrics/phpmetrics \ infection/infection
Configuration synchronization
Copies predefined configuration files into the project, overwriting existing ones. No merging is performed; conflicts are resolved via Git.
bin/piqule.php sync bin/piqule.php sync --dry-run
Composer scripts (optional)
Piqule provides configuration files for PHP tooling. Composer scripts are project-specific and not enforced.
A reference setup used in this repository: https://github.com/haspadar/piqule/blob/main/composer.json
Docker image
Piqule includes a Dockerfile that builds a Docker image with infrastructure-level linters.
The Docker image contains:
- actionlint
- hadolint
- markdownlint-cli2
- yamllint
- typos
- pmd (CPD)
The Docker image is provided as a ready-to-use local environment for running linters without installing them on the host system. The Docker image is optional and independent of CI workflows.
Before building the Docker image, ensure managed files are synchronized using bin/piqule.php sync.
Example local usage:
docker build -t piqule -f .piqule/Dockerfile . docker run --rm -v "$PWD:/app" -w /app piqule markdownlint-cli2 "**/*.md"
Contributing
Fork the repository, apply changes, and open a pull request.
Before submitting, ensure all Piqule checks pass locally or in CI.
License
MIT