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

Latest Version on Packagist Tests Check & fix styling Total Downloads

Matrix is a cutting-edge PHP library for asynchronous task management, inspired by JavaScript’s async/await paradigm but leveraging PHP's native Fibers. Matrix provides a streamlined, non-blocking API to run tasks, manage errors, and handle results—all without the need for explicit task starting.

Matrix also supports manual task management through the Task class and robust error handling through a customizable ErrorHandler.


Why Matrix?

Matrix brings a JavaScript-like async experience to PHP, providing developers with the simplicity and power of managing asynchronous tasks without complexity.

Key Features


Installation

Install Matrix via Composer:

Matrix requires PHP 8.1 or above.


JavaScript-like Async API

Matrix brings the familiarity of JavaScript's async/await into PHP, making it incredibly easy to work with asynchronous tasks. Here's how you can use it:

This JavaScript-like API allows you to define tasks, handle success, and catch errors seamlessly—without needing to call a start method explicitly.

Handling Errors in Async Tasks

Matrix also makes it easy to handle errors in asynchronous tasks:

The catch() method allows you to define an error handler, making it straightforward to manage exceptions during task execution.


Task Management with the Task Class

If you prefer more manual control over your tasks, Matrix provides the Task class, allowing you to directly manage task lifecycles.

Creating and Managing Tasks

Pausing and Resuming Tasks

Matrix allows you to pause and resume tasks at will:

Task Status Management

Each task has a status (PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CANCELED) that can be queried using the getStatus() method.


Error Handling with the Handler Class

Matrix provides robust error handling through the Handler class. This class allows you to define retry logic, error logging, and final failure handling.

Example of Error Handling with Task

The Handler class can automatically retry tasks or log errors, making it highly customizable.


API Reference

Matrix\AsyncHelper

Matrix\Task

Matrix\Exceptions\Handler


Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Make your changes and commit (git commit -m 'Add new feature').
  4. Push your branch (git push origin feature/new-feature).
  5. Open a pull request!

License

Matrix is licensed under the MIT License. See the LICENSE file for more information.


Authors

See also the list of contributors who participated in this project.

Acknowledgments

Get Involved

Matrix offers a unique PHP async experience, bringing true concurrency and fiber-based task management to PHP developers. Star the repository on GitHub to help Matrix grow and to stay updated on new features.


All versions of matrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 ....