Download the PHP package butschster/laravel-git-hooks without Composer

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

Git hooks manager for Laravel application

321-3210662_git-hooks-git

Laravel Git Hooks manager is a beautiful tools for Laravel applications. It provides a simple and flexible API to manage git hooks, edit commit messages

Build Status Latest Stable Version Total Downloads License

Features

Requirements

Installation

From the command line run

composer require --dev butschster/laravel-git-hooks

Register git hooks by running artisan command

php artisan git:register-hooks

That's it!

Configuration

Publish the config file.

php artisan vendor:publish --provider="Butschster\GitHooks\Providers\GitHooksServiceProvider" --tag=config

Hooks

Configuration

You can set list oh hooks for each of type git hook. You can do it in config/git_hooks.php. As a hook you can use class names, service containers and closure functions.

Hook pre-commit

The pre-commit hook is run first, before you even type in a commit message. It’s used to inspect the snapshot that’s about to be committed, to see if you’ve forgotten something, to make sure tests run, or to examine whatever you need to inspect in the code. Exiting non-zero from this hook aborts the commit, although you can bypass it with git commit --no-verify. You can do things like check for code style (run lint or something equivalent), check for trailing whitespace (the default hook does exactly this), or check for appropriate documentation on new methods.

Hook prepare-commit-msg

The prepare-commit-msg hook is run before the commit message editor is fired up but after the default message is created. It lets you edit the default message before the commit author sees it. This hook takes a few parameters: the path to the file that holds the commit message so far, the type of commit, and the commit SHA-1 if this is an amended commit. This hook generally isn’t useful for normal commits; rather, it’s good for commits where the default message is auto-generated, such as templated commit messages, merge commits, squashed commits, and amended commits. You may use it in conjunction with a commit template to programmatically insert information.

Hook commit-msg

The commit-msg hook takes one parameter, which again is the path to a temporary file that contains the commit message written by the developer. If this script exits non-zero, Git aborts the commit process, so you can use it to validate your project state or commit message before allowing a commit to go through.

Hook post-commit

After the entire commit process is completed, the post-commit hook runs. It doesn’t take any parameters, but you can easily get the last commit by running git log -1 HEAD. Generally, this script is used for notification or something similar.


All versions of laravel-git-hooks with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
illuminate/container Version ^5.6|^6.0|^7.0
illuminate/config Version ^5.6|^6.0|^7.0
illuminate/support Version ^5.6|^6.0|^7.0
illuminate/contracts Version ^5.6|^6.0|^7.0
illuminate/console Version ^5.6|^6.0|^7.0
illuminate/pipeline Version ^5.6|^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 butschster/laravel-git-hooks contains the following files

Loading the files please wait ....