Download the PHP package jeleb-smile/php-git-hooks without Composer

On this page you can find all versions of the php package jeleb-smile/php-git-hooks. 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-git-hooks

php-git-hooks

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight

Git hooks for PHP projects.

Library based in git hook scripts for PHP projects.

Original scripts

Installation

Step 1: Composer

You must add the following line to the composer.json file to use with Symfony 3.0:

You can use "~2.0" for Symfony version 2.X.

Or you can write in your console:

If you don't have composer, you need download the binary file and run it:

Step 2: Configuration

Composer configuration.

After download all repositories, composer ask you about configuration.

Composer configuration in Symfony2 projects.

In Symfony2 projects you need add this lines in your composer.json:

Important: To use 2.X version you need symfony 2.7 version.

Bin directory configuration.

If your project haven't a "bin" directory, you can add this in your compose.json file.

Note: Not necessary for Symfony projects.

Manual config file for git hooks.

You can configure php-git-hooks, creating a php-git-hooks.yml file with...

... or you can copy php-git-hooks.yml.sample from vendor/bruli/php-git-hooks.

Update from v1.3.*

Php-cs-fixer configuration in php-git-hooks.yml file, is not compatible with 2.0 version. You should remove php-cs-fixer entry and execute "composer install".

Most easy way to update is delete php-git-hooks.yml and execute "composer install". You will see all the configuration questions again.

Config file for phpunit.

If you want use phpunit tool, you must create a phpunit.xml.dist in your project root directory. Alternatively you can copy from vendor/bruli/php-git-hooks/phpunit.xml.dist in your project root directory.

Config file for phpmd.

The same case that phpunit. You must create a PmdRules.xml in your project root directory or copy from php-git-hook directory.

Step 3: Enabling hooks.

The most easy way to enable hook is copy hook file into your .git/hooks directory.

For pre-commit hook:

You can enable this hooks with composer or manually executing

For commit-msg hook:

execute.

Valid pre-commit.

Fail pre-commit.

Credits

License

php-git-hooks is released under the MIT License. See the bundled LICENSE file for details.


All versions of php-git-hooks with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
mockery/mockery Version ~0.9
phpunit/phpunit-mock-objects Version ~3.0
phpunit/phpunit Version ~5.0
phpunit/php-code-coverage Version ~3.0
mybuilder/phpunit-accelerator Version ^1.1
squizlabs/php_codesniffer Version ~2.3
phpmd/phpmd Version ~2.2
symfony/dependency-injection Version ~2.7
symfony/config Version ~2.7
symfony/yaml Version ~2.7
fiunchinho/phpunit-randomizer Version ~2.0
seld/jsonlint Version 1.3.*
friendsofphp/php-cs-fixer Version 1.11
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 jeleb-smile/php-git-hooks contains the following files

Loading the files please wait ....