Lints your silverstripe php code, checks for potential bugs, and also has a raft of other helpful commands.
Install as global composer package and then try to access the commands, starting with sake-
from the command line.
# help
- sake-help
# composer
- sake-composer-about
- sake-composer-available-updates
- sake-composer-force-update
- sake-composer-require
- sake-composer-update
# find
- sake-find-in-files
- sake-find-large-files
# git
- sake-git-commit-and-push
- sake-git-commit-and-push-vendor-packages
- sake-git-diff-analyser
- sake-git-remove-stale-branches
- sake-git-merge-develop-and-production
- sake-git-squash-and-pr
- sake-git-squash-commits
- sake-git-tag
# php
- sake-php-set-timezone
# lint
- sake-lint-all
- sake-lint-compat
- sake-lint-ecs
- sake-lint-ide-annotator
- sake-lint-js
- sake-lint-one-file
- sake-lint-rector
- sake-lint-remove-origs
- sake-lint-stan
# webpack
- sake-npm-build
- sake-npm-dev
- sake-npm-install
- sake-npm-update-self
- sake-npm-watch
# silverstripe
- sake-ss-add-site
- sake-ss-create-env-file
- sake-ss-db-dump
- sake-ss-db-import
- sake-ss-db-open
- sake-ss-dev-build
- sake-ss-flush
- sake-ss-rsync-asset
- sake-ss-start-new-module
# test
- sake-test-site
# rsync
- sake-ss-rsync-assets
- sake-ss-rsync-db
- sake-ss-rsync-sspak
# scrutinizer
- sake-scrutinizer-add
# machine maintenance
- sake-update-vs-code
- open your terminal
- browse to root folder of your project and type:
composer require --dev sunnysideup/easy-coding-standards:dev-master
- open your terminal and type
composer global config minimum-stability dev
composer global config prefer-stable true
composer global require sunnysideup/easy-coding-standards:dev-master
- then add path to
~/.bashrc
(or otherwise): choose the appropriate one ...
PATH=~/.composer/vendor/bin:$PATH
PATH=~/.config/composer/vendor/bin:$PATH
This will make the global composer vendor/bin
available anywhere (use with care!).
- To enable it, run:
source ~/.bashrc
or restart your computer.
- Now you should be able to run it from anywhere like this:
sake-lint-ecs [dir]
(this command, and all the other commands listed above).
Commands should be run from the root directory of your project.
To find out the options for a specific command:
sake-my-command -h
If not installed globally, then you should add vendor/bin/
in front of the commands.
vendor/bin/sake-my-command -h