sunnysideup / easy-coding-standards
ECS PHP Linting.
Package info
github.com/sunnysideup/silverstripe-easy-coding-standards
Language:Shell
Type:silverstripe-vendormodule
pkg:composer/sunnysideup/easy-coding-standards
Requires
- cambis/silverstan: *
- friendsofphp/php-cs-fixer: *
- phan/phan: *@stable
- pheromone/phpcs-security-audit: *
- phpcompatibility/php-compatibility: dev-develop
- phpstan/extension-installer: *
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: *
- rector/rector: ^2.3
- squizlabs/php_codesniffer: ^4
- sunnysideup/env-file-generator: dev-main
- symplify/easy-coding-standard: ^13.0
- wernerkrauss/silverstripe-rector: dev-main
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 31.2.0
- 31.1.0
- 31.0.0
- 30.0.0
- 29.0.2
- 29.0.1
- 29.0.0
- 28.0.0
- 27.2.0
- 27.1.1
- 27.1.0
- 27.0.1
- 27.0.0
- 26.2.2
- 26.2.1
- 26.2.0
- 26.1.19
- 26.1.18
- 26.1.17
- 26.1.16
- 26.1.15
- 26.1.14
- 26.1.13
- 26.1.12
- 26.1.11
- 26.1.10
- 26.1.9
- 26.1.8
- 26.1.7
- 26.1.6
- 26.1.5
- 26.1.4
- 26.1.3
- 26.1.2
- 26.1.1
- 26.1.0
- 26.0.2
- 26.0.1
- 26.0.0
- 25.2.0
- 25.1.5
- 25.1.4
- 25.1.3
- 25.1.2
- 25.1.1
- 25.1.0
- 25.0.0
- 24.3.0
- 24.2.0
- 24.1.16
- 24.1.15
- 24.1.14
- 24.1.13
- 24.1.12
- 24.1.11
- 24.1.10
- 24.1.9
- 24.1.8
- 24.1.7
- 24.1.6
- 24.1.5
- 24.1.4
- 24.1.3
- 24.1.2
- 24.1.1
- 24.1.0
- 24.0.1
- 24.0.0
- 23.0.1
- 23.0.0
- 22.1.0
- 22.0.0
- 21.9.4
- 21.9.3
- 21.9.2
- 21.9.1
- 21.9.0
- 21.8.0
- 21.7.0
- 21.6.1
- 21.6.0
- 21.5.0
- 21.4.2
- 21.4.1
- 21.4.0
- 21.3.0
- 21.2.0
- 21.1.0
- 21.0.0
- 20.16.0
- 20.15.1
- 20.15.0
- 20.14.3
- 20.14.2
- 20.14.1
- 20.14.0
- 20.13.2
- 20.13.1
- 20.13.0
- 20.12.0
- 20.11.0
- 20.10.0
- 20.9.0
- 20.8.0
- 20.7.1
- 20.7.0
- 20.6.3
- 20.6.2
- 20.6.1
- 20.6.0
- 20.5.0
- 20.4.3
- 20.4.2
- 20.4.1
- 20.4.0
- 20.3.2
- 20.3.1
- 20.3.0
- 20.2.9
- 20.2.8
- 20.2.7
- 20.2.6
- 20.2.5
- 20.2.4
- 20.2.3
- 20.2.2
- 20.2.1
- 20.2.0
- 20.1.1
- 20.1.0
- 20.0.6
- 20.0.5
- 20.0.4
- 20.0.3
- 20.0.2
- 20.0.1
- 20.0.0
- 19.5.2
- 19.5.1
- 19.5.0
- 19.4.4
- 19.4.3
- 19.4.2
- 19.4.1
- 19.4.0
- 19.3.1
- 19.3.0
- 19.2.5
- 19.2.4
- 19.2.3
- 19.2.2
- 19.2.1
- 19.2.0
- 19.1.2
- 19.1.1
- 19.1.0
- 19.0.0
- 18.0.4
- 18.0.3
- 18.0.2
- 18.0.1
- 18.0.0
- 17.11.0
- 17.10.2
- 17.10.1
- 17.10.0
- 17.9.6
- 17.9.5
- 17.9.4
- 17.9.3
- 17.9.2
- 17.9.1
- 17.9.0
- 17.8.1
- 17.8.0
- 17.7.31
- 17.7.30
- 17.7.29
- 17.7.28
- 17.7.27
- 17.7.26
- 17.7.25
- 17.7.24
- 17.7.23
- 17.7.22
- 17.7.21
- 17.7.20
- 17.7.19
- 17.7.18
- 17.7.17
- 17.7.16
- 17.7.15
- 17.7.14
- 17.7.13
- 17.7.12
- 17.7.11
- 17.7.10
- 17.7.9
- 17.7.8
- 17.7.7
- 17.7.6
- 17.7.5
- 17.7.4
- 17.7.3
- 17.7.2
- 17.7.1
- 17.7.0
- 17.6.1
- 17.6.0
- 17.5.4
- 17.5.3
- 17.5.2
- 17.5.1
- 17.5.0
- 17.4.0
- 17.3.0
- 17.2.0
- 17.1.10
- 17.1.9
- 17.1.8
- 17.1.7
- 17.1.6
- 17.1.5
- 17.1.4
- 17.1.3
- 17.1.2
- 17.1.1
- 17.1.0
- 17.0.6
- 17.0.5
- 17.0.4
- 17.0.3
- 17.0.2
- 17.0.1
- 17.0.0
- 16.3.1
- 16.3.0
- 16.2.5
- 16.2.4
- 16.2.3
- 16.2.2
- 16.2.1
- 16.2.0
- 16.1.0
- 16.0.1
- 16.0.0
- 15.0.0
- 14.13.3
- 14.13.2
- 14.13.1
- 14.13.0
- 14.12.0
- 14.11.0
- 14.10.0
- 14.9.0
- 14.8.4
- 14.8.3
- 14.8.2
- 14.8.1
- 14.8.0
- 14.7.0
- 14.6.0
- 14.5.0
- 14.4.0
- 14.3.0
- 14.2.0
- 14.1.0
- 14.0.3
- 14.0.2
- 14.0.1
- 14.0.0
- 13.8.4
- 13.8.3
- 13.8.2
- 13.8.1
- 13.8.0
- 13.7.0
- 13.6.0
- 13.5.0
- 13.4.0
- 13.3.0
- 13.2.0
- 13.1.21
- 13.1.20
- 13.1.19
- 13.1.18
- 13.1.17
- 13.1.16
- 13.1.15
- 13.1.14
- 13.1.13
- 13.1.12
- 13.1.11
- 13.1.10
- 13.1.9
- 13.1.8
- 13.1.7
- 13.1.6
- 13.1.5
- 13.1.4
- 13.1.3
- 13.1.2
- 13.1.1
- 13.1.0
- 13.0.6
- 13.0.5
- 13.0.4
- 13.0.3
- 13.0.2
- 13.0.1
- 13.0.0
- 12.0.0
- 11.0.0
- 10.1.0
- 10.0.0
- 9.0.0
- 8.1.0
- 8.0.0
- 7.1.0
- 7.0.1
- 7.0.0
- 6.0.1
- 6.0.0
- 5.0.0
- 4.0.2
- 4.0.1
- 4.0.0
- 3.1.0
- 3.0.0
- 2.0.1
- 2.0.0
- 1.0.0
- dev-agents-md-update
This package is auto-updated.
Last update: 2026-11-29 17:47:25 UTC
README
Lints your silverstripe php code, checks for potential bugs, and also has a raft of other helpful commands.
tl;dr
Install as global composer package and then try to access the commands, starting with sake- from the command line.
commands available
Run sake-help for the full list, sake-help --more for summaries grouped by section,
sake-help <section> (e.g. sake-help git) for a single section, or sake-help -f <keyword> to search.
naming convention
sake-<category>-<group>-<task>, for example sake-lint-php-stan or sake-ss-db-import.
Any task that works on more than one website / project (many repos, a whole GitHub organisation, ...)
lives in the pm group: sake-<category>-pm-<task> (see sake-help -f -pm-).
# composer ## package - sake-composer-package-about - Shows which packages depend on a specific composer package - sake-composer-package-fork-comparison - Compares a GitHub repo and its forks to find forks with changes ahead of the base repo - sake-composer-package-require - Requires a composer package with specified branch using --prefer-source ## update - sake-composer-update - Updates composer packages with optional force, minimal changes, and auto-commit - sake-composer-update-available - Lists all outdated packages and security audit results - sake-composer-update-force - Forces update of dev packages via Packagist API and updates dependencies # find ## large - sake-find-large-files - Finds and lists files and directories larger than specified size - sake-find-large-folders - Analyzes folder sizes with customizable depth and sorting options ## misc - sake-find-in-files - Recursively searches for text string in all files using grep # general - sake-help - Displays a list of all available sake commands and their descriptions # git ## commit - sake-gc - Git commit shortcut: lists vendor modules with changes, has an LLM review the diff for security issues and write the commit message, then commits and pushes - sake-git-commit-and-push - Commits changes to git and pushes to remote with optional tagging and review - sake-git-commit-and-push-vendor-packages - Scans vendor directories for git changes and optionally commits them - sake-git-commit-quick - Quickly commits all changes and pushes with auto vendor checks - sake-git-commit-tag - Creates semantic version tags based on commit message prefixes (API:, ENH:, FIX:) ## info - sake-git-info - Displays comprehensive git repository information and sync state - sake-git-info-prod-diff - Diffs remote uncommitted changes and untracked files against your local codebase ## merge - sake-git-merge-majors - Guided merge of one version branch into another (e.g. SS5 → SS6), keeping version-specific code - sake-git-merge-pipeline-ssh - Generates SSH key pair for git pipeline authentication and displays both keys - sake-git-merge-towards-production - Merges branches stepwise through workflow: develop → test → stage → production - sake-git-merge-towards-production-changes - Summarises everything since the last commit in CHANGELOG.md and adds a categorised entry to it ## pm - sake-git-pm-add-collaborator - Manages collaborators on GitHub repositories (add, remove, list) - sake-git-pm-diff - Analyses recent git changes across repos and estimates the time spent - sake-git-pm-diff-analyser - Analyses git commits by committer over a period and estimates the effort involved - sake-git-pm-diff-recent - Net diff per GitHub repo (public + private) for the last X days - sake-git-pm-find-any-changes - Recursively searches for git repos with local changes or unpushed commits - sake-git-pm-fix-bitbucket-ssh - Moves Bitbucket SSH access to ssh.bitbucket.org (remotes, ssh config, known_hosts, git config) - sake-git-pm-master-to-main - Renames master branch to main across GitHub organization repositories - sake-git-pm-my-pull-requests - Lists pull requests filtered by mode (mine/incoming/review) and criteria - sake-git-pm-my-work-being-forked - Scans your repos and their forks to find branches ahead of originals - sake-git-pm-scrutinizer-add - Identifies GitHub repositories not yet added to Scrutinizer CI ## misc - sake-git-forks - Finds every fork branch in the GitHub network that is ahead of your branch and checks if it merges cleanly ## squash - sake-git-squash-and-pr - Squashes all commits in current branch and creates a pull request - sake-git-squash-commits - Squashes multiple commits into one with various filtering options - sake-git-squash-stale-branches - Removes local branches that have been merged, excluding protected branches like master and develop - sake-git-upgrade-5-to-6-all - For every repo of an owner: if branch 5 is ahead of main, merge 5 into main, drop SS5-only changes, clean up conflicts, Rector (SS62) and verify SS6 with LLM help # lint ## class - sake-lint-class-namespacing - Scans PHP files and validates how each class is referenced (use statements, FQCNs) across the project - sake-lint-class-psr-4-checker - Validates and auto-corrects PHP namespaces for PSR-4 compliance - sake-lint-class-rename-comparison - Compares classes between two git branches to find renamed classes (optionally fixes references) ## files - sake-lint-files-js - Lints and auto-fixes JavaScript files using the Standard JS style - sake-lint-files-remove-origs - Finds and removes .orig files created by merge conflicts or patches ## php - sake-lint-php-compat - Checks code compatibility with specified PHP versions using PHPCompatibility - sake-lint-php-ecs - Runs PHP ECS linter to check and fix code style issues - sake-lint-php-phan - Performs static analysis on PHP code using Phan - sake-lint-php-rector - Refactors and upgrades PHP code automatically using Rector - sake-lint-php-security - Runs security checks including composer audit, semgrep, and vulnerability scanning - sake-lint-php-stan - Performs static analysis on PHP code using PHPStan ## run - sake-lint-run-all - Runs all linting tools in sequence: compat, ide-annotator, ecs, rector, and stan - sake-lint-run-one-file - Runs comprehensive linting on a single file or directory (compat, ecs, rector, stan) ## ss - sake-lint-ss-ide-annotator - Generates IDE annotations and DocBlock hints for DataObjects - sake-lint-ss-template-check - Checks template files for conflicts and aligns with vendor module structure # llm - sake-llm-add-agents-file - Adds an AGENTS.md file (instructions for LLM coding agents) to a project (default) or globally for your user - sake-llm-opencode - Runs OpenCode LLM agent to process files based on custom prompts # npm ## build - sake-npm-build - Builds production-ready npm/webpack assets for deployment - sake-npm-build-dev - Runs npm build in development mode with unminified assets - sake-npm-build-watch - Watches files and automatically rebuilds assets when changes are detected ## package - sake-npm-package-audit - Audits npm packages for security vulnerabilities and outdated dependencies - sake-npm-package-install - Installs NPM packages for webpack and application, including node-sass rebuild - sake-npm-package-publish-on-npmjs-org - Publishes an npm package to npmjs.org with automatic version bumping # php ## config - sake-php-config-switch-versions - Switches the active PHP version to match require.php in composer.json (via php-switch) - sake-php-config-timezone - Sets the PHP timezone in all php.ini configuration files ## misc - sake-php-line-counter - Counts PHP lines of code and estimates project complexity in hours # server ## management - sake-server-management-check-basics - Checks the basics on one or more servers over SSH (backups, git state, composer packages) # ss ## build - sake-ss-build-dev - Runs SilverStripe dev/build with proper permissions and folder setup - sake-ss-build-flush - Clears all SilverStripe caches and runs dev/build with flush ## contribute - sake-ss-contribute-step-1 - Clones repo, creates fork, sets up remotes, and creates working branch - sake-ss-contribute-step-2 - Squashes commits, rebases onto target branch, pushes to fork for PR ## db - sake-ss-db-dump - Exports SilverStripe database to an .sspak file - sake-ss-db-export - Executes SQL or exports to CSV using SilverStripe .env credentials - sake-ss-db-import - Imports a MySQL database dump file into local SilverStripe database - sake-ss-db-open - Opens MySQL CLI connected to SilverStripe database from .env credentials ## rsync - sake-ss-rsync-all - Syncs database and assets between local and remote server - sake-ss-rsync-assets - Syncs public/assets folder between local and remote server via rsync - sake-ss-rsync-db - Syncs database between local and remote server via SSH - sake-ss-rsync-sspak - Syncs database and assets from remote server using sspak format ## start - sake-ss-start-env-file - Generates a SilverStripe .env file from YAML configuration data - sake-ss-start-new-feature - Creates a new feature branch with optional database and asset sync - sake-ss-start-new-module - Creates a new SilverStripe module from template with GitHub and Packagist setup - sake-ss-start-new-site - Adds a new SilverStripe site to your environment - sake-ss-start-test-site - Creates fresh SilverStripe test site with mock data for module testing ## upgrade - sake-ss-upgrade-align-versions - Aligns SilverStripe core package versions to match requirements - sake-ss-upgrade-install-upgrader - Installs the SilverStripe upgrade tool into /var/www/upgrader - sake-ss-upgrade-ready - Checks if SilverStripe project meets version requirements and dependencies - sake-ss-upgrade-security-update - Runs complete security update workflow with tests and composer updates # test - sake-test-speed-server - Gentle server health check and benchmark (CPU, RAM, disk I/O, database) - sake-test-speed-site - Tests website performance by measuring response times and connection speed # update ## app - sake-update-app-chromium - Updates Chromium browser to the latest available version - sake-update-app-shell - Updates the shell to Zsh and configures terminal environments - sake-update-app-vs-code - Updates Visual Studio Code to the latest stable version ## runtime - sake-update-runtime-composer - Updates Composer dependency manager to the latest version - sake-update-runtime-go - Updates Go programming language to the latest version - sake-update-runtime-npm - Updates NVM, Node.js, and npm to their latest stable versions # self - sake-self-edit - Opens the code of this module in OpenCode for editing - sake-self-update
server lists
Commands in the sake-server-management-* group read one SSH login per line.
The default is ./servers.txt in the directory where the command is run.
Otherwise SAKE_SERVERS_FILE from ~/.config/composer/.env (or a project
.env) is used.
Resolution order (first match wins):
--servers-file FILEor the positional file argumentSAKE_SERVERS_FILEin the project.env./servers.txtin the current working directorySAKE_SERVERS_FILEin~/.config/composer/.env~/.config/composer/servers.txtSAKE_SERVERS(optional inline fallback)
Each line is an SSH login: user@host, host, or an ~/.ssh/config alias.
Blank lines and lines starting with # are ignored.
Example servers.txt:
# production
user@111.222.333.444
myserver-alias
# test
testuser@111.222.333.555
Set a global default in ~/.config/composer/.env:
SAKE_SERVERS_FILE=/home/me/servers.txt SAKE_SERVERS_PAUSE_SECONDS=20
SAKE_SERVERS_FILE may point at a shared list or a project-local file. You can
also symlink ~/.config/composer/servers.txt to a list instead.
How to install for one project (not recommended - as it may not work)
- open your terminal
- browse to root folder of your project and type:
composer require --dev sunnysideup/easy-coding-standards:dev-main
global install (recommended - more likely to work)
- open your terminal and type
# install ... composer global config minimum-stability dev composer global config prefer-stable true composer global require sunnysideup/easy-coding-standards:dev-main cat << 'EOF' >> ~/.bashrc # Add composer path PATH=~/.config/composer/vendor/bin:$PATH EOF source ~/.bashrc
or restart your computer.
- Now you should be able to run it from anywhere like this:
sake-lint-php-ecs [dir]
(this command, and all the other commands listed above).
How to use
Commands should be run from the root directory of your project.
To find out the options for a specific command:
sake-my-command -h
Not installed globally?
If not installed globally, then you should add vendor/bin/ in front of the commands.
vendor/bin/sake-my-command -h