Skip to content

Instantly share code, notes, and snippets.

@chaance
Created September 2, 2021 04:09
Show Gist options
  • Save chaance/bcd99fbf1096785af7300104be9cc9cd to your computer and use it in GitHub Desktop.
Save chaance/bcd99fbf1096785af7300104be9cc9cd to your computer and use it in GitHub Desktop.
Example composer.json for a WordPress project using PHP Codesniffer
{
"name": "blah/blah",
"type": "wordpress-theme",
"authors": [
{
"name": "Chance Strickland",
"email": "hi@chance.dev"
}
],
"require": {
"php": ">=7.3",
"vlucas/phpdotenv": "^3.5.0"
},
"require-dev": {
"chancedigital/wp-coding-standards": "0.4.0",
"composer/installers": "~1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"phpcompatibility/phpcompatibility-wp": "^2"
},
"autoload": {
"psr-4": {
"ChanceDigital\\Slim_Chance\\": "inc"
}
},
"config": {
"platform": {
"php": "7.3"
}
},
"scripts": {
"post-install-cmd": [
"composer install-codestandards"
],
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment