happyprime / coding-standards
Happy Prime coding standards
Package info
github.com/happyprime/coding-standards
Language:JavaScript
Type:phpcodesniffer-standard
pkg:composer/happyprime/coding-standards
Requires
- php: >=7.4
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- php-stubs/wordpress-stubs: 7.0 as 6.9.4
- php-stubs/wordpress-tests-stubs: 7.0 as 6.9.4
- php-stubs/wp-cli-stubs: dev-master
- phpcompatibility/php-compatibility: ^10.0@dev
- phpcompatibility/phpcompatibility-paragonie: ^2.0@dev
- phpcompatibility/phpcompatibility-wp: ^3.0@dev
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^9.6
- sirbrillig/phpcs-variable-analysis: ^3
- squizlabs/php_codesniffer: ^3.13.3
- szepeviktor/phpstan-wordpress: ^2.0
- wp-coding-standards/wpcs: ^3.4
- yoast/phpunit-polyfills: ^4.0
Suggests
- dealerdirect/phpcodesniffer-composer-installer: Automatically adds this package's ruleset to the installed_paths option of PHP_CodeSniffer
This package is auto-updated.
Last update: 2026-08-19 17:52:21 UTC
README
PHP_CodeSniffer ruleset, PHPStan config, and shared JS/CSS tooling configs used across Happy Prime projects.
What's in here
| Path | What it is |
|---|---|
HappyPrime/ruleset.xml |
The HappyPrime phpcs standard — WPCS + PHPCompatibilityWP + VariableAnalysis |
phpstan.neon.dist |
PHPStan level 1 with WordPress, WP-CLI, and test stubs pre-scanned |
common-configs/ |
Shared editorconfig, prettier, stylelint, postcss, webpack configs |
eslint-config/, stylelint-config/, postcss-config/ |
Published npm packages |
Install
composer require --dev happyprime/coding-standards:^1.0@alpha
The 1.0.0-alpha line tracks the PHPCompatibility 10 alpha, which has no stable release yet. Composer will refuse the install unless your root composer.json opts in to prereleases:
{
"minimum-stability": "dev",
"prefer-stable": true
}
Drop the php-compatibility hack
Projects that worked around the missing PHPCompatibility 9.x release with an inline
package repository should delete it:
"repositories": [ { "type": "package", "package": { "name": "phpcompatibility/php-compatibility", "version": "9.99.9", "source": { "type": "git", "url": "...", "reference": "develop" } } } ]
Usage
phpcs.xml.dist:
<?xml version="1.0"?> <ruleset name="Project"> <rule ref="HappyPrime"/> <file>.</file> </ruleset>
phpstan.neon:
includes: - vendor/happyprime/coding-standards/phpstan.neon.dist
testVersion defaults to 7.4-. Override it in your own ruleset if the project has a
higher floor:
<config name="testVersion" value="8.1-"/>