Download the PHP package jasny/dummy-middleware without Composer

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

Jasny Dummy Middleware

Build Status Scrutinizer Code Quality Code Coverage Packagist Stable Version Packagist License

Dummy client and server middleware for PSR-7 requests. Works both as PSR-15 and double pass middleware.

The dummy services work as null objects / passthrough, preventing the use of if's.

Installation

composer require jasny/dummy-middleware

Usage

Server middleware

Server middleware can be used all passthrough of PSR-7 server requests.

Single pass middleware (PSR-15)

The middleware implements the PSR-15 MiddlewareInterface. As PSR standard many new libraries support this type of middleware, for example Zend Stratigility.

Double pass middleware

Many PHP libraries support double pass middleware. These are callables with the following signature;

To get a callback to be used by libraries as Jasny Router and Relay, use the asDoublePass() method.

Client middleware

Client middleware can be used for PSR-7 compatible HTTP clients like Guzzle and HTTPlug.

Double pass middleware

The client middleware can be used by any client that does support double pass middleware. Such middleware are callables with the following signature;

Most HTTP clients do not support double pass middleware, but a type of single pass instead. However more general purpose PSR-7 middleware libraries, like Relay, do support double pass.

The client middleware does not conform to PSR-15 (single pass) as that is intended for server requests only.

Guzzle

Guzzle is the most popular HTTP Client for PHP. The middleware has a forGuzzle() method that creates a callback which can be used as Guzzle middleware.

HTTPlug

HTTPlug is the HTTP client of PHP-HTTP. It allows you to write reusable libraries and applications that need an HTTP client without binding to a specific implementation.

The forHttplug() method for the middleware creates an object that can be used as HTTPlug plugin.


All versions of dummy-middleware with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
psr/http-message Version ^1.0
psr/http-server-middleware 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 jasny/dummy-middleware contains the following files

Loading the files please wait ....