Download the PHP package andreagroferreira/redis-stream without Composer

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

Redis Stream Package for Laravel

A powerful, reliable Redis Streams implementation for Laravel applications. This package makes it easy to work with Redis Streams for event-driven applications, message processing, and real-time data pipelines.

Latest Version on Packagist Total Downloads PHP Version Support Laravel Version Support GitHub forks GitHub stars

Features

Installation

You can install the package via composer:

Redis Driver Requirements

This package supports both phpredis (the PHP extension) and predis (PHP library) drivers:

For PHP Redis Extension (recommended for production):

For Predis Library:

The package will automatically detect which driver you're using.

After installation, publish the configuration file:

Configuration

Configure your Redis connection for streams in your .env file:

You can also define custom streams in the redis_stream.php config file.

Usage

Exception Handling

This package provides specific exception types for better error handling:

Example of handling exceptions:

Basic Example

Using the Artisan Command

Creating a Custom Handler

Batch Publishing

For high-throughput scenarios, you can publish messages in batches:

Stream Trimming

To manage stream size:

Creating Custom Stream Producers

You can access named stream producers defined in your config:

Generating Custom Producers and Consumers

This package provides Artisan commands to quickly scaffold custom producer and consumer classes:

Creating a Producer

This will generate an OrderProducer class that extends the base functionality of RedisStreamProducer.

Creating a Consumer

The --command flag will also generate a dedicated Artisan command to run this consumer:

Consumer Implementation Example

After generating a consumer, you can customize the handleMessage method to process specific event types:

Testing

This package uses Pest PHP for testing:

For code coverage:

Note: To run the full test suite including feature tests, you need to have Redis installed and configured locally. The feature tests interact with an actual Redis server to verify the Redis Stream functionality.

The tests include both unit tests for exceptions and feature tests for Redis Stream interactions. In our CI setup, we only verify basic functionality to avoid Redis configuration issues in automated environments.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of redis-stream with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
illuminate/support Version ^9.0|^10.0|^12.0
illuminate/console Version ^9.0|^10.0|^12.0
illuminate/filesystem Version ^9.0|^10.0|^12.0
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 andreagroferreira/redis-stream contains the following files

Loading the files please wait ....