定制 vonage/symfony 二次开发

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

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

vonage/symfony

Composer 安装命令:

composer require vonage/symfony

包简介

Provides config and dependency injection for the Vonage Client in Symfony applications

README 文档

README

Contributor Covenant Apache 2.0 licensed

Nexmo is now known as Vonage

This is the Vonage API PHP client bundle for use with the Symfony Framework. To use this, you'll need a Vonage account. Sign up for free at nexmo.com.

This bundle is currently in development/beta status, so there may be bugs

Installation

Applications that use Symfony Flex

$ composer require vonage/symfony

Applications that don't use Symfony Flex

Step 1: Download the bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require vonage/symfony

Step 2: Enable the bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Vonage\ClientBundle\VonageClientBundle::class => ['all' => true],
];

Configuration

You can configure the bundle with your application details by creating a YAML file with your credentials. The easiest way is to dump the config and copy it to configs/packages/vonage_client.yaml.

$ bin/console config:dump-reference VonageClientBundle

You can then fill in the needed credentials from your Vonage Dashboard.

Usage

This bundle takes care of all the client creation needed for making the Vonage client, and adds it to the service container. All you need to do is add your credentials and any other info like Vonage Application ID to your config. You can pull the class from the service container or use it as part of the autowiring system.

namespace App\Controller;

use Vonage\Client;
use Vonage\SMS\Message\SMS;

class MyController
{
    /**
     * @var Client
     */
    protected $client;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }
    public function myAction(): Response
    {
        $this->client->sms()->send(
            new SMS($toNumber, $vonageNumber, 'This is an SMS!')
        );
    }
}

vonage/symfony 适用场景与选型建议

vonage/symfony 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19.53k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 11 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 vonage/symfony 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vonage/symfony 我们能提供哪些服务?
定制开发 / 二次开发

基于 vonage/symfony 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-11-19