Download the PHP package captainhook/captainhook without Composer

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

Latest Stable Version PHP Version Downloads Downloads Downloads License Build Status Code Quality Code Coverage X Mastodon

CaptainHook

CaptainHook logo

CaptainHook is an easy to use and very flexible git hook library for php developers. It enables you to configure your git hook actions in a simple json file.

You can use CaptainHook to validate or prepare your commit messages, ensure code quality or run unit tests before you commit or push changes to git. You can automatically clear local caches or install the latest composer dependencies after pulling the latest changes.

CaptainHook makes it easy to share hooks within your team and even can make sure that everybody in your team activates the hooks locally.

You can run cli commands, use some built in validators, or write your own PHP classes that get executed by CaptainHook. For more information have a look at the documentation.

Installation

The preferred method to install CaptainHook is to install the PHAR file. You can do so by using Phive, use the PHAR Composer package, or download the PHAR from the GitHub release page.

Or use Composer to install it.

If you want to get the source code with all its dependencies you can use:

Setup

After installing CaptainHook you can use the captainhook executable to create a configuration.

After creating the captainhook.json configuration file you have to activate the hooks by installing them to your local .git directory. To do so just run the following CaptainHook command.

Have a look at this short installation video.

Install demo

One of the goals of CaptainHook is to make it easy for a team to use the same git hooks. If you want to make sure everybody actually installs the hooks you can use the small Composer plugin hook-installer. It runs the captainhook install command everytime you run a Composer command.

Off course teammates can still commit without executing the hooks, that's why you should run appropriate checks on the backend as well. But at least this way nobody can forget to install them "by accident".

Configuration

Here's an example captainhook.json configuration file.

Documentation

The full documentation can be found at php.captainhook.info.

Contributing

So you'd like to contribute to the CaptainHook project? Excellent! Thank you very much. I can absolutely use your help.

Have a look at the contribution guidelines.


All versions of captainhook with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
ext-spl Version *
ext-xml Version *
captainhook/secrets Version ^0.9.4
sebastianfeldmann/camino Version ^0.9.2
sebastianfeldmann/cli Version ^3.3
sebastianfeldmann/git Version ^3.14
symfony/console Version ^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0
symfony/filesystem Version ^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0
symfony/process Version ^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.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 captainhook/captainhook contains the following files

Loading the files please wait ....