chteuchteu/symfony-exceptions-2-gitlab-issues-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

chteuchteu/symfony-exceptions-2-gitlab-issues-bundle

Composer 安装命令:

composer require chteuchteu/symfony-exceptions-2-gitlab-issues-bundle

包简介

Creates & updates issues on a GitLab repository from Symfony2 exceptions

README 文档

README

That's a very long name, but at least we know what it does.

Latest Stable Version

Once installed, this bundle will open/update an issue on your GitLab repository when an exception is thrown:

SymfonyExceptions2GitLabIssuesBundle

  • We build the issue title from the exception file, line and message
  • If an issue exists with this title, we'll update it
  • We put some relevant information in the issue body (request method (GET, POST, ...) & URI, logged in user, stacktrace)
  • We add/update a comment: "Thrown 3 times, last one was 14/07/2016 09:37:47"

Installation

  1. Add this bundle to your project:

    composer require chteuchteu/symfony-exceptions-2-gitlab-issues-bundle
  2. Register this bundle in symfony's kernel:

    // app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Chteuchteu\SymExc2GtlbIsuBndle\SymfonyExceptions2GitLabIssuesBundle(),
        );
    }
  3. Generate a GitLab API token. Navigate to https://gitlab.com/profile (replace the URL with your instance's if necessary, but don't miss the /profile part), then "Personal Access Tokens".

    You can name it whatever you want, but "SymfonyExceptions2GitLabIssuesBundle" seems to be a great name.

    Note: you can share this token between several projects.

  4. Configure this bundle inside your project:

    # config.yml
    sym_exc_2_gtlb_isu_bndle:
        gitlab_api_url: https://gitlab.com/api/v3/
        gitlab_token: (put your token here)
        project: your_project_name
        excluded_exceptions:
            - Symfony\Component\HttpKernel\Exception\NotFoundHttpException

    Note: if you're using https://gitlab.com, you can actually skip the gitlab_api_url. If not, don't forget the /api/v3/ part.

  5. Deploy your app in production, and trigger an exception. An issue should be waiting for you in your GitLab repository.

  6. (optional) Customize the excluded_exceptions node to include/exclude exceptions from being handled by this bundle. By default (if the excluded_exceptions isn't specified), all exceptions are handled.

Configuration

Here are some more things you can configure. Just add these items to your config.yml, under the sym_exc_2_gtlb_isu_bndle node.

  • reopen_closed_issues - boolean, default true:

    When set to true, any closed issue will be reopened when a matching exception is caught.

  • excluded_environments - array, default ['dev', 'test']:

    When encountering an exception in one of these environments, we won't report anything to your GitLab repository.

    Tip: include back the dev environment (excluded_environments: []) to test this bundle without deploying to prod!

  • excluded_exceptions - array, default []:

    Array of FQCN (fully qualified class name) of exceptions to ignore.

    Tip: add Symfony\Component\HttpKernel\Exception\NotFoundHttpException to ignore 404 exceptions.

  • mentions - array, default []:

    GitLab users to be mentioned in the issue body. Example: ['user1', 'user2', 'user3'] will append "Mentions: @user1 @user2 @user3" at the end of the message.

TODO

  • Make more things configurable:
    • Issue body template
    • Comment datetime format?
  • Handle pagination when finding issue
  • Test mode
  • Help diagnose problems (monolog logging)

chteuchteu/symfony-exceptions-2-gitlab-issues-bundle 适用场景与选型建议

chteuchteu/symfony-exceptions-2-gitlab-issues-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 578 次下载、GitHub Stars 达 3, 最近一次更新时间为 2016 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Symfony2」 「exceptions」 「gitlab」 「issues」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 chteuchteu/symfony-exceptions-2-gitlab-issues-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2016-07-14