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.
Once installed, this bundle will open/update an issue on your GitLab repository when an exception is thrown:
- 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
-
Add this bundle to your project:
composer require chteuchteu/symfony-exceptions-2-gitlab-issues-bundle
-
Register this bundle in symfony's kernel:
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Chteuchteu\SymExc2GtlbIsuBndle\SymfonyExceptions2GitLabIssuesBundle(), ); }
-
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
/profilepart), 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.
-
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. -
Deploy your app in production, and trigger an exception. An issue should be waiting for you in your GitLab repository.
-
(optional) Customize the
excluded_exceptionsnode to include/exclude exceptions from being handled by this bundle. By default (if theexcluded_exceptionsisn'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, defaulttrue: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\NotFoundHttpExceptionto 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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 chteuchteu/symfony-exceptions-2-gitlab-issues-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
php7ify is a project that brings new php7 classes and exceptions to php 5.x.
The CodenamePHP Platform core that contains basic interfaces, exceptions etc..
PHP GitLab generic API client (not stick to any version)
A collection of monolog handlers using PSR-18 http client
A simple package to better handle Exceptions.
Symfony2 Barcode Generator Bundle with Twig function extension
统计信息
- 总下载量: 578
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-only
- 更新时间: 2016-07-14
