承接 e-moe/guzzle6-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

e-moe/guzzle6-bundle

最新稳定版本:v1.3.0

Composer 安装命令:

composer require e-moe/guzzle6-bundle

包简介

Integrates Guzzle 6 into your Symfony application

README 文档

README

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

统计信息

  • 总下载量: 257.01k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固