theseoframework / wpcs-tsf
Modified (for TSF) PHP_CodeSniffer rules (sniffs) to enforce WordPress and TSF coding conventions.
Installs: 44
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
pkg:composer/theseoframework/wpcs-tsf
Requires
- php: >=7.0
- wp-coding-standards/wpcs: ^2.3
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0|^1.0
- phpcompatibility/php-compatibility: ^9.0
- phpcompatibility/phpcompatibility-wp: ^2.0.0
- phpunit/phpunit: ^4.0 || ^5.0 || ^6.0 || ^7.0
- roave/security-advisories: dev-master
- sirbrillig/phpcs-variable-analysis: ^2.11.0
Suggests
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.
This package is auto-updated.
Last update: 2025-10-10 08:38:45 UTC
README
This package helps you validate your PHP files against WordPress coding standards, as used for The SEO Framework product family.
This package primarily relies on WordPress/WordPress-Coding-Standards, with added sniffs used in development for TSF.
Installation
- Open Terminal.
cdto folder you want to installtheseoframework/wcps-tsf.- Enter:
composer create-project theseoframework/wpcs-tsf
Updating
- Open Terminal.
cdto root folder where this project'scomposer.jsonresides.- Enter:
composer update.
Usage (VScode)
- Download/install PHP on your drive.
- Install the phpcs VScode extension by Ioannis Kappas (more instructions in link).
Required VScode config (example for Windows)
Unlisted settings are optional.
{
"php.validate.executablePath": "C:\\your-php-installation-folder\\php.exe",
"phpcs.executablePath": "C:\\the-folder-you-ran-composer-for-this-project\\wpcs-tsf\\vendor\\bin\\phpcs.bat",
"phpcs.standard": "TSF",
"phpcs.errorSeverity": 1,
"phpcs.warningSeverity": 1,
}
Issues
On Windows, PHP might not be recognized as an internal or external command.
For this, you need to set PHP to your PATH environmental variable at:
- (enter this in the address bar at WLK+E)
Control Panel\System and Security\SystemAdvanced system settings.
But, it's probably easier to install XAMPP, which should take care of this for you.
Be sure to restart VScode when you're done setting the PATH variable.