Download the PHP package felipebool/crook without Composer

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

Build Status Maintainability Codacy Badge Codacy Badge

Crook

First of all, Crook is a work in progress.

If you are not familiar with git hooks, you may want to read Git Hooks documentation first.

Crook is the simplest way to define and manage your Git Hooks. Its aim is to allow scripts from your composer.json run when git hook actions are triggered.

Usage

The aim of this project is to be as simple as possible, thus, you won't have to write any PHP code, you just need to install any packages from packagist and then make them run for partucular git hooks. The process is explained in the following sections.

Installation

Just run

Init Crook

will create crook.json configuration file and theHook in the root of your project.

Add a new hook

will create a symbolic link from .git/hooks/hook-name to theHook, enabling that hook.

Remove a hook

will remove the symbolic link .git/hooks/hook-name, disabling that hook.

Add a action to composer.json

When you add a new action using you need to add what is expected to run when that action is triggered inside you composer.json. To do that, you must create a new entry inside the section and then define what must run there.

Crook configuration file

Crook uses a json configuration file just like composer, it is called crook.json. The configuration is made, basically, by writting as a key the git hook name and as value the respective script entry in composer.json. See the following example

Although you are able to edit crook.json by yourself, you should do it using in order to create the symbolic links. Only the composer path must be set manually. The mechanism is explained in the next section.

The mechanism

Every time you run a

Crook creates a symbolic link from .git/hooks/hook-name to /your/project/hook/theHook, simple as that.

Now, when git trigger the action hook-name, it will follow the link to /your/project/hook/theHook and Crook will then look for a script named action-name inside your project's composer.json and will execute the commands defined there.

Adding code validation using phpcs before any commit

In order to check your code against PSR2, you must do this

Add the script action inside composer.json

Initialize crook

Bind code-check to pre-commit hook

Next time you run crook will run the code defined inside code-check and will prevent code from being commited if the check fail.


All versions of crook with dependencies

PHP Build Version
Package Version
Requires symfony/console Version ^4.0
php Version ^7.1
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 felipebool/crook contains the following files

Loading the files please wait ....