All Projects → e-moe → guzzle6-bundle

e-moe / guzzle6-bundle

Licence: MIT license
Integrates Guzzle 6 into your Symfony application

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects

Projects that are alternatives of or similar to guzzle6-bundle

mailchimp-bundle
MailChimp integration with Symfony and MailChimp API V3
Stars: ✭ 40 (+263.64%)
Mutual labels:  packagist, bundle, symfony-bundle
GuzzleBundleOAuth2Plugin
OAuth2 Plugin for GuzzleBundle
Stars: ✭ 13 (+18.18%)
Mutual labels:  guzzle, bundle, symfony-bundle
awsBundle
Symfony AWS Bundle (supports Symfony 2, 3 and 4)
Stars: ✭ 18 (+63.64%)
Mutual labels:  bundle, symfony-bundle
BeelabTagBundle
🏷 A simple implementation of tags for Symfony and Doctrine ORM
Stars: ✭ 45 (+309.09%)
Mutual labels:  bundle, symfony-bundle
vite-bundle
Integration with your Symfony app & Vite
Stars: ✭ 56 (+409.09%)
Mutual labels:  bundle, symfony-bundle
AtoumBundle
This bundle provides a simple integration of atoum into Symfony 2.
Stars: ✭ 44 (+300%)
Mutual labels:  bundle, symfony-bundle
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (+136.36%)
Mutual labels:  bundle, symfony-bundle
supervisor-bundle
Easily update your @Supervisor configuration by using annotations in Symfony commands.
Stars: ✭ 35 (+218.18%)
Mutual labels:  bundle, symfony-bundle
hashed-asset-bundle
Apply an asset version based on a hash of the asset for symfony/asset
Stars: ✭ 24 (+118.18%)
Mutual labels:  bundle, symfony-bundle
FkrCssURLRewriteBundle
A small assetic filter for symfony to fix all url paths at css documents to correct urls
Stars: ✭ 33 (+200%)
Mutual labels:  bundle, symfony-bundle
wordpress-bundle
Use Wordpress and Symfony together using a Symfony bundle
Stars: ✭ 30 (+172.73%)
Mutual labels:  bundle, symfony-bundle
LexikMailerBundle
This Symfony2 bundle allow you to manage some HTML email templates stored in your database. Templates are written with Twig and use I18N. You can also create some layouts to decorate your email.
Stars: ✭ 81 (+636.36%)
Mutual labels:  bundle, symfony-bundle
LiipSoapRecorderBundle
[DEPRECATED] Recorder/Player for SOAP communications
Stars: ✭ 12 (+9.09%)
Mutual labels:  bundle, symfony-bundle
NucleosDompdfBundle
📜 This bundle provides a wrapper for using dompdf inside symfony.
Stars: ✭ 29 (+163.64%)
Mutual labels:  bundle, symfony-bundle
connect-bundle
No description or website provided.
Stars: ✭ 35 (+218.18%)
Mutual labels:  bundle, symfony-bundle
socketio
No description or website provided.
Stars: ✭ 23 (+109.09%)
Mutual labels:  bundle, symfony-bundle
DynamicParametersBundle
[UNMAINTAINED] Runtime retrieval of parameters from environment variables for Symfony
Stars: ✭ 42 (+281.82%)
Mutual labels:  bundle, symfony-bundle
LiipImagineSerializationBundle
Provides integration between LiipImagineBundle and JMSSerializerBundle
Stars: ✭ 24 (+118.18%)
Mutual labels:  bundle, symfony-bundle
jsonrpc-bundle
JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC-webservices
Stars: ✭ 31 (+181.82%)
Mutual labels:  bundle, symfony-bundle
OpcacheBundle
Displays the PHP OPcache status in the Symfony profiler toolbar.
Stars: ✭ 21 (+90.91%)
Mutual labels:  bundle, symfony-bundle

Symfony Guzzle6Bundle

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status SensioLabsInsight

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

Requirements

  • PHP 5.6 or above
  • Symfony 2.7 or above (including Symfony 3.x, 4.x, 5.x)

Installation

To install this bundle, run the command below and you will get the latest version by Packagist.

composer require e-moe/guzzle6-bundle

To use the newest (maybe unstable) version please add following into your composer.json:

{
    "require": {
        "e-moe/guzzle6-bundle": "dev-master"
    }
}

Usage

Load bundle in AppKernel.php (should be done automatically if you are using Symfony Flex):

new Emoe\GuzzleBundle\EmoeGuzzleBundle(),

Configuration in config.yml (optional):

emoe_guzzle:
    log:
        enabled: true # Logging requests to Monolog
        format: 'Guzzle: [{ts}] "{method} {uri} HTTP/{version}" {code}' # Optional log format customization

see more about log format syntax.

Using Guzzle in controllers:

$client   = $this->get('guzzle.client');
$response = $client->get('http://example.com');

Using Guzzle in your own services:

  application.my_service:
    class: App\Service\MyService
    arguments:
      - "@guzzle.client"

or you can just use autowire feature with GuzzleHttp\ClientInterface type hint.

Features

Symfony Debug Profiler

Guzzle Requests

Symfony Debug Timeline

Guzzle Timeline Integration

Symfony Debug Toolbar

Guzzle Toolbar Integration

Symfony Debug Logs (Monolog Integration)

Guzzle Monolog Logs

Suggestions

Adding aliases: If you want to use different names for provided services you can use aliases. This is a good idea if you don't want have any dependency to guzzle in your service name.

services:
   http.client:
       alias: guzzle.client

Creating multiple clients: If you want to have different Guzzle clients in your application all you need is to define them in services file and add "guzzle.client" tag to turn on Symfony integration (Debug toolbar, logs, so on..).

services:
    guzzle.client_one:
        class: GuzzleHttp\Client
        tags:
            - { name: guzzle.client }

    guzzle.client_two:
        class: GuzzleHttp\Client
        tags:
            - { name: guzzle.client }

Authors

  • Nikolay Labinskiy aka e-moe

Inspired by Chris Wilkinson's and Florian Preusner's GuzzleBundles (1, 2).

See also the list of contributors who participated in this project.

License

This bundle is released under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].