https://github.com/webgriffe/hyva-coding-standard-dist
Hyva Coding Standard distribution for Webgriffe projects (no dep conflicts)
https://github.com/webgriffe/hyva-coding-standard-dist
Last synced: 5 days ago
JSON representation
Hyva Coding Standard distribution for Webgriffe projects (no dep conflicts)
- Host: GitHub
- URL: https://github.com/webgriffe/hyva-coding-standard-dist
- Owner: webgriffe
- License: osl-3.0
- Created: 2026-06-05T16:08:11.000Z (21 days ago)
- Default Branch: master
- Last Pushed: 2026-06-09T15:35:02.000Z (17 days ago)
- Last Synced: 2026-06-09T17:24:57.137Z (17 days ago)
- Language: PHP
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
# webgriffe/hyva-coding-standard-dist
Hyvä Themes PHP_CodeSniffer coding standard distribution for Webgriffe projects.
Repackages [hyva-themes/hyva-coding-standard](https://github.com/hyva-themes/hyva-coding-standard)
with minimal dependencies to avoid version conflicts when installed alongside Magento.
## Installation
```sh
composer require --dev webgriffe/hyva-coding-standard-dist
```
Composer will prompt you to allow the `dealerdirect/phpcodesniffer-composer-installer` plugin
(one-time), or add it upfront to your project's `composer.json`:
```json
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
```
The `dealerdirect` plugin automatically registers the `HyvaThemes` and `Magento2` standards
in phpcs on every `composer install` / `composer update`.
## Usage
```sh
vendor/bin/phpcs --standard=HyvaThemes app/code/path/to/check
```
## Known issue: hardcoded `installed_paths` in post-install-cmd
If your project's `composer.json` already has a `post-install-cmd` / `post-update-cmd` script
that calls `phpcs --config-set installed_paths ...` directly, it runs **after** the `dealerdirect`
plugin and overwrites the registered paths. Fix: append `vendor/webgriffe/hyva-coding-standard-dist`
to that list:
```json
"post-install-cmd": [
"[ -f vendor/bin/phpcs ] && vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard,...,vendor/webgriffe/hyva-coding-standard-dist || true"
]
```