Download the PHP package friendsofphp/php-cs-fixer without Composer

On this page you can find all versions of the php package friendsofphp/php-cs-fixer. 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?
friendsofphp/php-cs-fixer
Rate from 1 - 5
Rated 5.00 based on 1 reviews

All versions of php-cs-fixer with dependencies

Informations about the package php-cs-fixer

PHP Coding Standards Fixer

The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You can also define your (team's) style through configuration.

It can modernize your code (like converting the pow function to the ** operator on PHP 5.6) and (micro) optimize it.

If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool does not only detect them, but also fixes them for you.

Documentation

Installation

The recommended way to install PHP CS Fixer is to use Composer in a dedicated composer.json file in your project, for example in the tools/php-cs-fixer directory:

For more details and other installation methods, see installation instructions.

Usage

Assuming you installed PHP CS Fixer as instructed above, you can run the following command to fix the files PHP files in the src directory:

See rule sets and configuration file documentation for more details.

If you need to apply code styles that are not supported by the tool, you can create custom rules.

Editor Integration

Dedicated plugins exist for:

Community

The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer. Bug reports and ideas about new features are welcome there.

You can reach us at https://gitter.im/PHP-CS-Fixer/Lobby about the project, configuration, possible improvements, ideas and questions, please visit us!

Contribute

The tool comes with quite a few built-in fixers, but everyone is more than welcome to contribute more of them.


Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
ext-tokenizer Version *
composer/semver Version ^3.2
composer/xdebug-handler Version ^3.0.3
doctrine/annotations Version ^1.13
php-cs-fixer/diff Version ^2.0
symfony/console Version ^5.4 || ^6.0
symfony/event-dispatcher Version ^5.4 || ^6.0
symfony/filesystem Version ^5.4 || ^6.0
symfony/finder Version ^5.4 || ^6.0
symfony/options-resolver Version ^5.4 || ^6.0
symfony/polyfill-mbstring Version ^1.23
symfony/polyfill-php80 Version ^1.25
symfony/polyfill-php81 Version ^1.25
symfony/process Version ^5.4 || ^6.0
symfony/stopwatch Version ^5.4 || ^6.0

The package friendsofphp/php-cs-fixer contains the following files

Loading the files please wait ....