Download the PHP package eightpoints/guzzle-bundle without Composer

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

Prerequisites | Installation | Configuration | Usage | Plugins | Events | Features | Suggestions | Contributing | Learn more | License

EightPoints GuzzleBundle for Symfony

Total Downloads Monthly Downloads Latest Stable Version Build Status Scrutinizer Score License

This bundle integrates Guzzle 6.x|7.x into Symfony. Guzzle is a PHP library for building RESTful web service clients.

GuzzleBundle follows semantic versioning. Read more on semver.org.


Prerequisites


Installation

Installing the bundle

To install this bundle, run the command below on the command line and you will get the latest stable version from Packagist.

Note: this bundle has a Symfony Flex Recipe to automatically register and configure this bundle into your symfony application.

If your project does not use Symfony Flex the following needs to be added to config/bundles.php manually:


Configuration

Guzzle clients can be configured in config/packages/eight_points_guzzle.yaml. For projects that use Symfony Flex this file is created automatically upon installation of this bundle. For projects that don't use Symfony Flex this file should be created manually.

Please refer to the Configuration Reference for a complete list of all options.

Usage

Guzzle clients configured through this bundle are available in the Symfony Dependency Injection container under the name eight_points_guzzle.client.<name of client>. So for example a client configured in the configuration with name payment is available as eight_points_guzzle.client.payment.

Suppose you have the following controller that requires a Guzzle Client:

Using manual wiring this controller can be wired as follows:

For projects that use autowiring, please refer to our documentation on autowiring.


Plugins

This bundle allows to register and integrate plugins to extend functionality of guzzle and this bundle.

Installation

In order to install a plugin, find the following lines in src/Kernel.php:

and replace them with the following:

Known and Supported Plugins


Events

This bundle dispatches Symfony events right before a client makes a call and right after a client has made a call. There are two types of events dispatched every time; a generic event, that is dispatched regardless of which client is doing the request, and a client specific event, that is dispatched only to listeners specifically subscribed to events from a specific client. These events can be used to intercept requests to a remote system as well as responses from a remote system. In case a generic event listener and a client specific event listener both change a request/response, the changes from the client specific listener override those of the generic listener in case of a collision (both setting the same header for example).

Listening To Events

In order to listen to these events you should create a listener and register that listener in the Symfony services configuration as usual:

For more information, read the docs on intercepting requests and responses.


Features

Symfony Debug Toolbar / Profiler

Logging

All requests are logged to Symfony's default logger (@logger service) with the following (default) format:

Example:

You can change the message format by overriding the eight_points_guzzle.symfony_log_formatter.pattern parameter. For all options please refer to Guzzle's MessageFormatter.


Suggestions

Create aliases for clients

In case your project uses manual wiring it is recommended to create aliases for the clients created with this bundle to get easier service names and also to make it easier to switch to other implementations in the future, might the need arise.

In case your project uses autowiring this suggestion does not apply.


Contributing

👍 If you would like to contribute to this bundle, please read CONTRIBUTING.md.

#8p-guzzlebundle.

🎉 Thanks to all contributors who participated in this project.


Learn more


License

This bundle is released under the MIT license.


All versions of guzzle-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
guzzlehttp/guzzle Version ^6.5.8|^7.4.5
guzzlehttp/promises Version ^1.5.3|^2.0
guzzlehttp/psr7 Version ^1.9.1|^2.5
symfony/framework-bundle Version ~5.0|~6.0|~7.0
symfony/expression-language Version ~5.0|~6.0|~7.0
symfony/stopwatch Version ~5.0|~6.0|~7.0
psr/log Version ~1.0|~2.0|~3.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 eightpoints/guzzle-bundle contains the following files

Loading the files please wait ....