Download the PHP package chani/wajha without Composer

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

Safi/Wajha Router

A fast, lightweight HTTP router for PHP 8.3+ combining $O(1)$ static hash map lookups with first-character bucketed PCRE2 regex evaluation for dynamic routes.


Technical Features


Requirements


Installation


Usage Examples

1. Basic Setup & Dispatching

Routes are registered via WajhaCompiler and evaluated via WajhaDispatcher.


2. Type Shorthands

Pattern aliases expand during compilation into native PCRE2 patterns.

Supported shorthands:


3. Backed Enum Matching

String-backed PHP 8.1+ Enums translate into regex alternation groups (case1|case2) at compile time.


4. Route Grouping

Prefix concatenation occurs strictly during compilation.


5. Optional Path Segments

Optional segments marked with square brackets ([/...]) expand recursively at compile time.


6. Reverse Routing (URL Generation)

Route names can be attached during definition via the name argument. URL synthesis is handled by the standalone WajhaUrlGenerator class, keeping the inbound dispatcher completely unencumbered by reverse-mapping overhead.


7. Twig Template Integration

To expose reverse URL generation within Twig templates, register a custom path() function with your Twig environment:

You can then generate URLs directly inside your .twig files:


Benchmarks

Evaluated on PHP 8.5 over 100,000 request dispatch iterations against a 1,000 route dataset (70% valid routes, 15% method mismatches, 15% 404 targets):

Engine Throughput Avg Latency Speed Ratio
Safi/Wajha 446,189 req/s 2.241 µs Baseline (1.00x)
nikic/FastRoute 118,841 req/s 8.415 µs 3.75x slower
Phroute 115,164 req/s 8.683 µs 3.87x slower
Symfony Routing 103,832 req/s 9.631 µs 4.30x slower
AltoRouter 4,063 req/s 246.140 µs 109.82x slower

For detailed insights into the architecture, Zend VM micro-benchmarks, and real-world scenario trade-offs, see the write-up: Writing a PHP 8.5 Router Faster Than FastRoute


Running Benchmarks & Tests


License

MIT License. See LICENSE.md for details.


All versions of wajha with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
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 chani/wajha contains the following files

Loading the files please wait ...