Download the PHP package alizharb/hookx without Composer
On this page you can find all versions of the php package alizharb/hookx. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alizharb/hookx
More information about alizharb/hookx
Files in alizharb/hookx
Package hookx
Short Description A next-generation, high-performance PHP 8.3+ hook and event system with async support.
License MIT
Informations about the package hookx
HookX
HookX is a next-generation, high-performance PHP hook and event system designed for modern applications. Built on PHP 8.3+, it leverages Attributes, Fibers, and Strong Typing to deliver a developer experience that is both powerful and elegant.
โจ Features
- Zero-Dependency: Pure PHP implementation, no external bloat.
- Async & Background Hooks: Run hooks in Fibers or push them to a Queue (Redis/Sync) using
#[Async]and#[Background]attributes. - Framework Integrations: Native support for Laravel and Symfony.
- Developer Experience: CLI tool (
bin/hookx), REPL, and global helpers (hook(),filter()). - Advanced Matching: Wildcards (
user.*) and Regex (#^order\.(created|updated)$#) support. - Safety: Immutable context, strict mode, and sandbox execution with time/memory limits.
- Performance: JIT compilation (experimental) and Zero-Copy dispatching.
๐ Requirements
- PHP 8.3 or higher
๐ฆ Installation
Install the package via Composer:
Documentation
- Basics: Core concepts, HookManager, and Priorities.
- Async & Queue: Background processing and Fibers.
- Advanced Usage: Wildcards, Regex, JIT, and Sandbox.
- CLI Tooling: Using the
hookxcommand-line tool. - Integrations:
- Laravel
- Symfony
- WordPress
Quick Start
Installation
Basic Usage
โก Async & Background Hooks
HookX supports both concurrent execution (Fibers) and true background processing (Queues).
For true background processing via Redis, check the Async Documentation.
๐ Documentation
For comprehensive documentation, check the docs/ directory:
- Introduction
- Installation
- Basic Usage
- Advanced Usage
- CLI Tooling
- Async & Background Hooks
- Filters
- Framework Integrations
๐งช Testing
Run the test suite:
๐ License
The MIT License (MIT). Please see License File for more information.