Download the PHP package paysera/lib-php-cs-fixer-config without Composer

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

lib-php-cs-fixer-config

Library helps to fix PHP code to conform Paysera PHP style guide.

Installation

Prerequisite

Install and check

No need to install php-cs-fixer itself as this library comes with binary version of the fixer. This avoids requiring it's dependencies inside your project, which could clash with existing ones.

To avoid duplication with php-cs-fixer library, it's named paysera-php-cs-fixer.

.php_cs files

Migration mode

For new projects you can just use all the rules as usual.

For existing projects we recommend turning on the migration mode:

  1. Add call to enableMigrationMode([]) to PayseraConventionsConfig instance in your .php_cs file.
  2. Run {your-bin-dir}/php-cs-fixer - it will give error with initial rule configuration to pass into that method. Just copy-and-paste it to your .php_cs file.
  3. Enable one of the rules, apply fixes in the project, review and test them.
  4. Repeat with each new rule.

This allows to control which rules are enabled in the project thus letting manually tune the fixes already applied in the repository and forced for the new code. Also your commits will be more focused as each of them will include only changes from a single fixer.

All rules are to be configured to allow easily spotting new rules in case they would be added (or removed) into the core.

Running fixer with tests

For comments or suggestions for developers you should use default .php_cs file with all the rules.

For automatic checks there might be some false-positives so .php_cs_risky should be used in such cases.

You can look at .travis.yml file in this repository for integration with travis on each pull request of your repository (this will run the checks only for changed files).

Usage

Run in project directory by command: {your-bin-dir}/php-cs-fixer fix /path/to/code --verbose --dry-run --diff

Use --config=.php_cs flag for custom configuration.

If /path/to/code is not defined php-cs-fixer will run files from default src directory excluding Test folders.

--verbose - show the applied rules. When using the txt format it will also displays progress notifications.

A combination of --dry-run and --diff will display a summary of proposed fixes, leaving your files unchanged.

--format option for the output format. Supported formats are txt (default one), json, xml and junit.

More information: PHP CS Fixer


All versions of lib-php-cs-fixer-config with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
doctrine/inflector Version ^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 paysera/lib-php-cs-fixer-config contains the following files

Loading the files please wait ....