Download the PHP package unh3ck3d/php-cs-fixer-git-hook without Composer

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

MIT licensed Code coverage

php-cs-fixer-git-hook

Git hook running PHP CS Fixer on staged files using CaptainHook
Report Bug · Request Feature

About The Project

Git hook that with each git commit command runs Php Cs Fixer on staged files to automatically fix them and re-stage before committing.

(back to top)

Requirements

(back to top)

Installation

  1. Install package as a dev dependency using composer

  2. Add the following code to your captainhook.json configuration file

  3. Install newly added hook by following CaptainHook docs

That's it. From now on after running git commit files that were staged will be automatically fixed by Php Cs Fixer.

(back to top)

Configuration

You can customize the behaviour how git hook is run by changing following options

Option Description
phpCsFixerPath Path to Php Cs Fixer executable. Defaults to ./vendor/bin/php-cs-fixer.
pathMode path-mode cli option of Php Cs Fixer. Defaults to intersection.
config config cli option of Php Cs Fixer. Defaults to .php-cs-fixer.dist.php.
additionalArgs String of additional arguments that will be passed to Php Cs Fixer process.

e.g.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)


All versions of php-cs-fixer-git-hook with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
captainhook/captainhook Version ^5.0.0
sebastianfeldmann/cli Version ^3.4
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 unh3ck3d/php-cs-fixer-git-hook contains the following files

Loading the files please wait ....