Download the PHP package silverassist/coding-standards without Composer

On this page you can find all versions of the php package silverassist/coding-standards. 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 coding-standards

Silver Assist Coding Standards

Framework-agnostic PHPCS ruleset (PSR-12 + mandatory PHPDoc) and a PHPStan base config, shared by every Silver Assist PHP project — WordPress plugin or not.

This package intentionally has zero WordPress dependencies. WordPress plugins should require silverassist/wp-coding-standards instead, which requires this package and layers WordPress-Extra, i18n, and naming-convention sniffs on top.

Install

Installing via Composer (private repository)

SilverAssist packages are installed from their GitHub repositories with a Composer vcs repository, not from Packagist.org. Those repositories can require authentication, so always configure a token.

  1. Declare the repository in your project's root composer.json. Composer only reads repositories from the root package, so every SilverAssist package your project needs must be listed there, including transitive ones:

  2. Authenticate with a GitHub token that can read the repository:

    • Locally: composer config --global github-oauth.github.com <token>
    • CI: set COMPOSER_AUTH='{"github-oauth":{"github.com":"<token>"}}' from a secret (a GitHub Actions secret or a Bitbucket variable).

    Never commit a token or an auth.json. Without a token, Composer hits GitHub's anonymous API limit (60 requests per hour per IP) and falls back to an SSH clone.

  3. Refresh the lock file if your project commits composer.lock: run composer update --lock after adding repositories, so the lock file's content-hash matches composer.json.

Troubleshooting

Symptom Cause
Failed to clone the [email protected]:SilverAssist/coding-standards.git repository, try running in interactive mode... followed by Permission denied (publickey) The token is missing or has no access to the repository.
remote: Invalid username or token The token is invalid or expired.
it could not be found in any version The vcs entry is missing from the root composer.json.

Usage — PHPCS

Create a phpcs.xml in your project (this package never scans files itself — it only ships the rule definitions):

Run it:

Migrating a legacy codebase

If PHPDoc type-hint enforcement is too strict for code that hasn't been typed yet (see senioradvicecom-wp's strangler-fig migration), exclude just those two sub-sniffs locally:

Usage — PHPStan

Legacy projects that can't yet run at level 8 can override it after the include:

What's deliberately NOT here

See also


All versions of coding-standards with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
squizlabs/php_codesniffer Version ^3.7 || ^4.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 silverassist/coding-standards contains the following files

Loading the files please wait ...