-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Nate Devereux edited this page Dec 7, 2023
·
6 revisions
💡 Note: this only needs to be done once. And may already have been done on your project
- import dependency with composer require
composer require --dev silverstripeltd/bespoke-standards
- ensure
slevomat/coding-standard
andphp-parallel-lint/php-parallel-lint
are removed from your projects dependencies.
composer remove --dev slevomat/coding-standard
composer remove --dev php-parallel-lint/php-parallel-lint
- Update the associated scripts in the
composer.json
'sscript
section to use the new commands
Be mindful of all references you might need to update (i.e. circleCI configs, script that reference others, etc)
Your final file may look something like the one below
{
"scripts": {
"silverstripe-standards": [
"@php-lint",
"@phpcs",
"yarn lint",
"yarn prettier:check" // if you have prettier etc
],
"php-lint": "bespoke-phplint",
"phpcs": "bespoke-phpcs",
"phpcbf": "bespoke-phpcbf",
"phpcs-fix": "@phpcbf",
}
}
- Remove your root level
phpcs.xml
if it exists and start using the Silverstripe Bespoke Standards 🎉
If there are standards you wish to keep, or its too large of a change in one go read the Overriding rulesets page to learn about more.
- How to create a custom sniff
- License