Download the PHP package jerome/matrix without Composer

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

Matrix

Matrix provides small, event-driven async helpers for ReactPHP. It makes promise composition, concurrency limits, retries, timeouts, cancellation, and rate limiting consistent without pretending to create threads or process-level parallelism.

Requirements

No pcntl, posix, or sockets extension is required.

Install it with Composer:

Core usage

Import the helpers explicitly in each file:

async() schedules a callable on the ReactPHP loop. The callable must use non-blocking I/O; sleep(), file_get_contents(), CPU-heavy work, and synchronous database clients still block the loop.

await() is a top-level synchronous bridge for CLI scripts and other code that owns the loop. It must not be called from inside an already-running loop callback. Use promise chaining inside an event-driven application instead.

Composition and concurrency

All combinators accept promises or plain values. all(), race(), and any() accept any iterable. all() preserves keys:

map() accepts arrays or generators, preserves keys, and limits active work when $concurrency is greater than zero. pool() does the same for zero-argument task callables. Both stop scheduling new work after the first failure and observe already-running tasks.

batch() groups values in encounter order and flattens each batch result into a list. waterfall() passes each result to the next callable.

Timeouts, retries, and cancellation

Timeouts cancel the losing operation and their timer. Retry backoff is event-loop based. Invalid durations, limits, or attempt counts throw InvalidArgumentException before work is scheduled.

cancellable() returns a native ReactPHP PromiseInterface. Calling cancel() invokes the cleanup callback once and forwards cancellation to the wrapped promise:

Rate limiting

The limiter uses a sliding window and removes cancelled queued calls before execution.

Events and metrics

Matrix emits promise.created, promise.resolved, promise.rejected, and promise.timeout events for Matrix-created operations. Listener exceptions are isolated so an observer cannot break application work.

metricsCollector()->getMetrics() keeps cumulative counters and bounded timing samples. Percentiles describe the most recent 1,024 samples per operation series, so metrics remain safe in long-running workers.

Development

The check runs Composer validation, Pint, PHPStan at maximum level, and PHPUnit. See UPGRADING.md for the 3.x to 4.0 migration notes.

License

Matrix is released under the MIT license.


All versions of matrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
react/event-loop Version ^1.6
react/promise Version ^3.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 jerome/matrix contains the following files

Loading the files please wait ...