Download the PHP package vena/php-cs-fixer-wordpress without Composer

On this page you can find all versions of the php package vena/php-cs-fixer-wordpress. 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 php-cs-fixer-wordpress

WordPress php-cs-fixer ruleset

This package contains a Frankenstein's monster of rules and fixers for PHP CS Fixer which attempt to satisfy most of the WordPress Coding Standards. It builds upon the @PSR2 and @PhpCsFixer rulesets, along with custom fixers for some WordPress peculiarities.

WPCS rules not covered by this package include, but are not limited to:

Yoda style looks to no longer be required in WPCS 3.0, so it is not required in this ruleset.

I use PHP CS Fixer because I find it easier to integrate into my workflow than PHP_CodeSniffer. If you are not me, and especially if you require WPCS compliance, I highly suggest that you stick with PHP_CodeSniffer and the official WPCS sniffs.

Use

Custom Fixers

WordPressParenthesesSpacesFixer

With few exceptions, WPCS specifies spaces after opening and before closing parenthesis.

WordPressArrayIndexSpacesFixer

If a variable is used as an array key, it must be flanked by spaces. All other keys should not have spaces.

WordPressMultilineAssocArrayFixer

For any array which contains multiple items and any associative key, each item must appear on a new line. NOTE: This fixer DOES NOT fix indentation, and should be used with the array_indentation rule.

WordPressCapitalPDangitFixer

Attempts to automatically correct common misspellings of WordPress in strings and comments. Its rule, Vena/wp_capital_p_dangit, is not included in the RuleSet::getRules() helper, and must be added to your config if you intend to use it. Unlike the official WPCS sniff, this does not care about class names. NOTE: This is a risky fixer that may not accurately distinguish safe transforms.

Credits

PHP CS Fixer

WordPress Coding Standards.

Test scaffolding is built on the work of Kuba Werłos' PHP CS Fixer: custom fixers


All versions of php-cs-fixer-wordpress with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
friendsofphp/php-cs-fixer Version ^3.0.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 vena/php-cs-fixer-wordpress contains the following files

Loading the files please wait ....