Download the PHP package rtcamp/wp-phpcs without Composer

On this page you can find all versions of the php package rtcamp/wp-phpcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-phpcs

wp-phpcs

PHP 8.2+ PHP_CodeSniffer 3.x

rtCamp's PHP_CodeSniffer standards for WordPress projects (rtcamp/wp-phpcs): rtCampWP-Basic and the stricter rtCampWP.


Developed in rtCamp/wp-tooling. The rtCamp/wp-phpcs repository is a read-only mirror, split from there on each release. Please open issues and pull requests in wp-tooling.

Shared PHP_CodeSniffer standards for rtCamp WordPress projects. Each skeleton (plugin, theme, and future tracks) extends one of these instead of copying — and drifting — a long PHPCS config. The rules curate and combine:

These are WordPress standards. The base sniffs (WPCS, VIP) assume a WordPress codebase and will be noisy on non-WordPress PHP — use a framework-agnostic standard for that.

Standards

Standard What it is Use when
rtCampWP The full strict superset: everything in rtCampWP-Basic plus short-array enforcement and the Slevomat strict-typing, code-quality and doc-block sniffs (declare(strict_types=1), mandatory parameter/property/return type hints, etc.). New or public projects ready to adopt strict types. Default for greenfield work.
rtCampWP-Basic WPCS (WordPress-Extra) + WordPress-VIP-Go + WordPress-Docs + PHPCompatibilityWP, with modern idioms ([], ?:) allowed and one-blank-line function spacing. No strict-typing requirements. Adopting standards on an existing codebase, or when strict types are not yet practical.

rtCampWP is rtCampWP-Basic plus the strict layer, so the two never diverge — there is a single source of truth.

Installation

This pulls in PHPCS and every external sniff (WPCS, VIPCS, PHPCompatibilityWP, Slevomat), so you do not list them yourself. The PHP_CodeSniffer Standards Composer Installer registers the standards automatically — just allow the plugin in your composer.json:

Confirm they registered with vendor/bin/phpcs -i — you should see rtCampWP and rtCampWP-Basic in the list.

Usage

Add a phpcs.xml.dist at your project root that references the standard and supplies the project-specific configuration the shared standard deliberately leaves out — the files to scan, testVersion, minimum_wp_version, global prefixes, text domain, and file-naming mode:

A complete, commented starting point is in phpcs.xml.dist.example — copy it to your project root, rename it to phpcs.xml.dist, and adjust the values.

Overriding rules

Both standards are a starting point. Exclude or down-tune any sniff in your own phpcs.xml.dist:

What stays in your project config (not the shared standard)

testVersion, minimum_wp_version, WordPress.WP.I18n text domain, WordPress.NamingConventions.PrefixAllGlobals prefixes, WordPress.Files.FileName (is_theme vs PSR-4), the <file> paths to scan, and per-path test excludes — these are project-specific and live in your phpcs.xml.dist, never here.

License

GPL-2.0-or-later. See LICENSE.

rtCamp


All versions of wp-phpcs with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
dealerdirect/phpcodesniffer-composer-installer Version ^1.0
wp-coding-standards/wpcs Version ^3.2
automattic/vipwpcs Version ^3.0
phpcompatibility/phpcompatibility-wp Version ^2.1
slevomat/coding-standard Version ~8.22.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rtcamp/wp-phpcs contains the following files

Loading the files please wait ...