Download the PHP package m6web/guzzle-http-bundle without Composer

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

GuzzleHttpBundle

Build Status Latest Stable Version Total Downloads License PHP Version Require

The GuzzleHttpBundle provide Guzzle clients as Symfony services.

Installation

Require the bundle with Composer:

For older Symfony versions, you can try to install an older version of this bundle.

If you don't use Symfony Flex, register the bundle in your kernel:

Usage

Add the m6web_guzzlehttp section in your configuration file. Here is the minimal configuration required.

All subkey under clients defines an instance of guzzle http client. These services are named m6web_guzzlehttp_+subkey expect for the default subkey that define the main service m6web_guzzlehttp.

Then you can ask container for your client:

The service return a configured guzzle client, for more information on how to use it, you can read the guzzle6 documentation.

The only difference with guzzle6 reside in usage of curl for the redirect responses. You can choose to have the guzzle behavior for redirection by setting the configuration key redirect_handler to guzzle.

When a cache system is available, you can use cache_force and cache_ttl in addition of guzzle options than respectively force clear cache before request and use a specific ttl to a request that override configuration.

DataCollector

A data collector is available when the Symfony profiler is enabled.

It allows you to inspect the following data:

NOTE: If you choose Guzzle for redirect_handler, The redirect count and redirect time will always be zero. Cache information are available when a cache system is set.

Cache system

You can set a cache for request by adding in the config the guzzlehttp_cache with service subkey who is a reference to a service implementing M6Web\Bundle\GuzzleHttpBundle\Cache\CacheInterface

We provide an "In memory" cache class that you can use by defining a new cache service and use it in Guzzle configuration:

We also provide a cache interface for Redis with our RedisBundle >= 2.4, than you can use in this way:

For more information on how to set up the RedisBundle, refer to the README in the project.

We provide also the same cache system for APCU through the ApcuBundle.

Configuration reference

As some configuration options accept multiples data types, all services references must start with a @ character.

For the headers options, the key in array represent the header name. The underscore will be transformed to hyphen except if it's escaped by a backslash.

Adding a middleware

Implement M6Web\Bundle\GuzzleHttpBundle\Middleware\MiddlewareInterface.

Tag your service with m6web_guzzlehttp.middleware and specify the client as follows:

Contributing

First, thank you for contributing!

Here are few rules to follow for an easier code review before the maintainers accept and merge your pull request:

Running the test

Install the composer dev dependencies

Then run the test with atoum unit test framework


All versions of guzzle-http-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
guzzlehttp/guzzle Version ^7
symfony/config Version ^5.4||^6.0
symfony/dependency-injection Version ^5.4||^6.0
symfony/event-dispatcher Version ^5.4||^6.0
symfony/http-kernel Version ^5.4||^6.0
symfony/yaml Version ^5.4||^6.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 m6web/guzzle-http-bundle contains the following files

Loading the files please wait ....