Download the PHP package yoast/yoastcs without Composer

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

Yoast Coding Standards

Coverage Status

Yoast Coding Standards (YoastCS) is a project with rulesets for code style and quality tools to be used in Yoast projects.

Installation

Standalone

Standards are provided as a Composer package and can be installed with:

As dependency

To include standards as part of a project require them as development dependencies:

Composer will automatically install dependencies and register YoastCS and other external standards with PHP_CodeSniffer.

Tools provided via YoastCS

PHP Parallel Lint

PHP Parallel Lint is a tool to lint PHP files against parse errors.

PHP Parallel Lint does not use a configuration file, so command-line options need to be passed to configure what files to scan.

It is best practice within the Yoast projects, to add a script to the composer.json file which encapsules the command with the appropriate command-line options to ensure that running the tool will yield the same results each time.

Typically, (a variation on) the following snippet would be added to the composer.json file for a project:

PHP Code Sniffer

Set of PHP_CodeSniffer rules.

Severity levels:

The YoastCS Standard

The Yoast standard for PHP_CodeSniffer is comprised of the following:

Files within version management and dependency related directories, such as the Composer vendor directory, are excluded from the scans by default.

Sniffs

To obtain a list of all sniffs used within YoastCS:

Sniff Documentation

Not all sniffs have documentation available about what they sniff for, but for those which do, this documentation can be viewed from the command-line:

Running the sniffs

Command line

For more command-line options, please have a read through the PHP_CodeSniffer documentation.

Yoast plugin repositories

All Yoast plugin repositories contain a [.]phpcs.xml.dist file which contains the repository specific configuration.

From the root of these repositories, you can run PHPCS by using:

PhpStorm

Refer to Using PHP Code Sniffer Tool in the PhpStorm documentation.

After installation, the Yoast standard will be available as a choice in PHP Code Sniffer Validation inspection.

The YoastCS "Threshold" report

The YoastCS package includes a custom YoastCS\Yoast\Reports\Threshold report for PHP_CodeSniffer to compare the current PHPCS run results with predefined "threshold" settings.

The report will look in the runtime environment for the following two environment variables and will take the values of those as the thresholds to compare the PHPCS run results against:

If the environment variables are not set, they will default to 0 for both, i.e. no errors or warnings allowed.

The report will not print any details about the issues found, it just shows a summary based on the thresholds:

After the report has run, a global YOASTCS_ABOVE_THRESHOLD constant (boolean) will be available which can be used in calling scripts.

To use this report, run PHPCS with the following command-line argument: --report=YoastCS\Yoast\Reports\Threshold. Note: depending on the OS the command is run on, the backslashes in the report name may need to be escaped (doubled).

For those Yoast plugin repositories which use thresholds, the status can be checked locally by running:

Changelog

The changelog for this package can be found in the CHANGELOG.md file.


All versions of yoastcs with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-tokenizer Version *
automattic/vipwpcs Version ^3.0.0
php-parallel-lint/php-console-highlighter Version ^1.0.0
php-parallel-lint/php-parallel-lint Version ^1.4.0
phpcompatibility/phpcompatibility-wp Version ^2.1.4
phpcsstandards/phpcsextra Version ^1.2.1
phpcsstandards/phpcsutils Version ^1.0.10
sirbrillig/phpcs-variable-analysis Version ^2.11.17
slevomat/coding-standard Version ^8.15.0
squizlabs/php_codesniffer Version ^3.9.1
wp-coding-standards/wpcs Version ^3.1.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 yoast/yoastcs contains the following files

Loading the files please wait ....