Download the PHP package warren/warren without Composer

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

Warren

Warren is a lightweight PHP library that enables quick and easy creation of both synchronous and asynchronous RabbitMQ message consumers (the "sub" part of "pub/sub").

Features

Warren is designed with two primary goals in mind:

  1. Easy, testable, object-oriented creation of service workers that are capable of undertaking multiple different actions, both request-only (asynchronous) and request-response (synchronous).
  2. Easy use of PSR7 middleware using the

idiom, with different middleware stacks for synchronous and asynchronous calls.

To this end, it provides an abstraction layer over the queue implementation, which converts the queue-specific message into a PSR7 object. Once the message has been successfully processed, it then goes the other way - converting the PSR7 response object back into the queue service's own internal representation.

Installation

Installation is simple - just use Composer:

composer require warren/warren

Dependencies

Warren requires PHP 7.1 or higher. In addition, you will need to install at least one of the following libraries in order to use the corresponding queue bindings:

Getting Started with Warren

To create a Warren-based service worker, you need to implement at least one of Warren\SynchronousAction or Warren\AsynchronousAction. Then, just plug it (or them) into Warren using the fluent interface:

Each call corresponds to a separate action, not unlike an endpoint for an HTTP API. The message header to use to determine which action to take can be set with:

You can add PSR7 middleware to a Warren worker like so:

Synchronous and asynchronous actions have separate middleware stacks. Note that any response values for asynchronous actions will be ignored.

Error Handling

In the event that an exception or error propagates its way to the top of the call stack, Warren's got you covered - just drop any implementation of Warren\ErrorHandler into either of the following two methods:

The error handler provided to setErrorHandler will be invoked if issues are encountered while processing the message. The handler provided to setReplyErrorHandler will be used if a problem is encountered while sending a reply message or acknowledging that the message has been processed.

Handling Signals

One of the most common requirements for RabbitMQ service workers is to allow tasks to run to completion, regardless of whether or not the service has been instructed to shut down. For this use case, Warren provides the abstract class Warren\Signal\SignalHandler - simply implement its handleSignals() method, and drop it into Warren like so:

By default, Warren will handle SIGTERM, SIGINT, and SIGHUP, and exit after completion of the current task.


All versions of warren with dependencies

PHP Build Version
Package Version
Requires psr/http-message Version 1.0.*
php Version >=7.1.0
ext-pcntl Version *
ringcentral/psr7 Version ^1.2
seld/signal-handler Version ^1.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 warren/warren contains the following files

Loading the files please wait ....