Download the PHP package php-http/discovery without Composer

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

HTTPlug Discovery

Latest Version Tests Code Coverage Quality Score Total Downloads

This library provides auto-discovery and auto-installation of well-known PSR-17, PSR-18 and HTTPlug implementations.

Install

Via Composer

Usage as a library author

Please see the official documentation.

If your library/SDK needs a PSR-18 client, here is a quick example.

First, you need to install a PSR-18 client and a PSR-17 factory implementations. This should be done only for dev dependencies as you don't want to force a specific implementation on your users:

Then, you can disable the Composer plugin embeded in php-http/discovery because you just installed the dev dependencies you need for testing:

Finally, you need to require php-http/discovery and the generic implementations that your library is going to need:

Now, you're ready to make an HTTP request:

Internally, this code will use whatever PSR-7, PSR-17 and PSR-18 implementations that your users have installed.

Usage as a library user

If you use a library/SDK that requires php-http/discovery, you can configure the auto-discovery mechanism to use a specific implementation when many are available in your project.

For example, if you have both nyholm/psr7 and guzzlehttp/guzzle in your project, you can tell php-http/discovery to use guzzlehttp/guzzle instead of nyholm/psr7 by running the following command:

This will update your composer.json file to add the following configuration:

Don't forget to run composer install to apply the changes, and ensure that the composer plugin is enabled:

Testing

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at [email protected].

License

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


All versions of discovery with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
composer-plugin-api Version ^1.0|^2.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 php-http/discovery contains the following files

Loading the files please wait ....