定制 ion-bazan/guzzle-bundle-aliyun-signer-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ion-bazan/guzzle-bundle-aliyun-signer-plugin

Composer 安装命令:

composer require ion-bazan/guzzle-bundle-aliyun-signer-plugin

包简介

Alibaba Cloud API Gateway request signing plugin for Guzzle Bundle ⛽️

README 文档

README

Latest version GitHub Workflow Status PHP version Codecov Mutation testing badge Scrutinizer Code Quality Downloads License

Description

This Guzzle Bundle plugin integrates ion-bazan/aliyun-http-signer with Symfony.

Requirements

Installation

Use Composer to install the plugin using:

composer require ion-bazan/guzzle-bundle-aliyun-signer-plugin

Usage

Enable the Bundle

Symfony 2.x and 3.x

Register the bundle in app/AppKernel.php file:

new EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle([
    new IonBazan\Bundle\GuzzleBundleAliyunSignerPlugin\AliyunRequestSignerPlugin(),
]);

Symfony 4+

To register the plugin in Symfony 4 and newer, replace registerBundles() method in src/Kernel.php:

public function registerBundles(): iterable
{
    $contents = require $this->getProjectDir().'/config/bundles.php';
    foreach ($contents as $class => $envs) {
        if ($envs[$this->environment] ?? $envs['all'] ?? false) {
            if ($class === \EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle::class) {
                yield new $class([
                    new \IonBazan\Bundle\GuzzleBundleAliyunSignerPlugin\AliyunRequestSignerPlugin(),
                ]);
            } else {
                yield new $class();
            }
        }
    }
}

Configuration

# config/packages/eight_points_guzzle.yaml
eight_points_guzzle:
    clients:
        my_client:
            base_url: "http://target.url"
            plugin:
                aliyun_signer:
                    app_id: 'Your AppID'
                    secret: 'Your Secret'

Bugs & issues

If you found a bug or security vulnerability, please open an issue

Contributing

Please feel free to submit Pull Requests adding new features or fixing bugs.

Please note that code must follow PSR-1, PSR-2, PSR-4 and PSR-7.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固