Download the PHP package rokde/devhooks without Composer

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

devhooks

Lightweight git hooks runner for PHP/JS projects.

Detects installed tools automatically from vendor/bin/ and node_modules/.bin/. No configuration required.

Installation

Per-project (recommended)

Global

Install once and use across all projects without adding it to each composer.json:

When installed globally, devhooks init writes hooks that call devhooks via $PATH. When installed locally, hooks call vendor/bin/devhooks instead. Both modes are detected automatically — no extra configuration needed.

init writes .git/hooks/pre-commit and .git/hooks/pre-push and can be re-run at any time to update the hooks to the latest version.

Note: .git/hooks/ is never committed to the repository. Each developer needs to run devhooks init once after cloning, regardless of whether they use a local or global installation.

Commands

Command Description
devhooks init Install/update git hooks in .git/hooks/
devhooks remove Remove devhooks-managed hooks from .git/hooks/
devhooks pre-commit Run fast checks on staged files only
devhooks pre-push Run full suite + main-divergence check

You can also invoke the commands directly without going through the git hook:

What runs when

pre-commit (staged files only)

Only files staged for the current commit are checked. For PHP source files, the corresponding test file is resolved automatically and passed to Pest.

Tool Scope
rector staged .php files
pint staged .php files
phpstan staged .php files
pest test files matching staged .php sources
oxlint staged .js/.ts/.jsx/.tsx files
oxfmt staged .js/.ts/.jsx/.tsx files
vitest staged .js/.ts/.jsx/.tsx files

pre-push (full codebase)

All tools run across the entire project. Additionally, the current branch is compared against origin/main before the suite starts.

Tool Scope
rector full codebase
pint full codebase
phpstan full codebase
pest full suite
oxlint full codebase
oxfmt full codebase
vitest full suite

Tool detection

Tools are discovered in this order:

  1. vendor/bin/<tool> (Composer local)
  2. node_modules/.bin/<tool> (npm/yarn/pnpm local)
  3. Global $PATH

If a tool is not found it is silently skipped — no error is raised.

Test file resolution

For a staged file like app/Foo/Bar.php, devhooks looks for a matching test in the following locations (first match wins):

If no test file is found the Pest run is skipped for that file.

Bypassing failed checks

If any check fails, devhooks asks for confirmation instead of aborting silently:

Answering y lets the commit or push proceed despite the failure. Anything else aborts. This gives you an escape hatch when you need to commit work-in-progress or push urgently without fixing all issues first.

Main-divergence check (pre-push)

When pushing from any branch other than main, devhooks fetches origin/main and counts commits that are not yet in the current branch. If any are found, you are asked to confirm before the push continues:

To use a different branch name as the integration branch:

Updating

Re-run init after updating the package to refresh the hook files:

Project structure


All versions of devhooks with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 rokde/devhooks contains the following files

Loading the files please wait ...