cloudoki/except-io-nal
最新稳定版本:v0.5.2
Composer 安装命令:
composer require cloudoki/except-io-nal
包简介
The Cloudoki PHP Exception extensions throw manageable errors in a multi-tier MQ alignment
关键字:
README 文档
README
The Cloudoki PHP Exception extensions throw manageable errors in a multi-tier MQ alignment.
The main goal of this package is to correctly bubble exceptions from the worker to the api layer. On the API layer, cases for production and development environments can be implemented.
####Dependencies None so far.
Install
- Add the cloudoki/except-io-nal package to your composer file (dev-master is fine).
- The Classes load as
\Cloudoki\SomeException. - Load the custom exception handler in
App/Exceptions/Handler.php, like so:
namespace App\Exceptions;
use Cloudoki\Proc\ExceptionalHandler;
class Handler extends ExceptionalHandler {}
##Usage The package defines a set of Exception extensions. They are easy to emplement in any PHP environment, but are especially useful in a MQ alignment (API <-> Worker). The Exceptions assist worker level errors to correctly bubble up in the API response.
####DatabaseException We use the DatabaseException to define unexpected database responses and time-outs on connections.
####InvalidEnvironmentException If an interaction is triggered outside the desired environment scope (eg. development or production), an InvalidEnvironment should be thrown to kill the process.
####MissingParameterException A common exception in API applications. Bubbles a useful error message if set up correctly.
####InvalidParameterException Probably the most common custom Exception.
####IncompleteModelException While developing new model scopes, this exception can be useful to flag accidently accessed unfinished logic.
####MissingSchemaException Schema's are used in the Cloudoki/SchemaModel package. To be released soon.
####QuotaExceededException Some quota limitation has been exceeded. Used in eg. the Limiter package.
####InvalidUserException A default authorisation error response.
####WorkerException The API should define errors bubbled up from the Worker response as a WorkerException for logging purposes.
##Responses The exceptions are even more useful in a development/production divided environment, where an endpoint consumer has no business with internal problems as eg. a worker-level logic bug. By default, the package returns 3 responses.
400 Response
Malformed method or request syntax
403 Response
No valid authorization provided
404 Response
Not Found
A 500 response should be avoided in any production situation.
cloudoki/except-io-nal 适用场景与选型建议
cloudoki/except-io-nal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.34k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「exceptions」 「MQ」 「3-layer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cloudoki/except-io-nal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cloudoki/except-io-nal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cloudoki/except-io-nal 相关的其它包
同方向 / 同关键字的高下载量 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..
A simple package to better handle Exceptions.
Monitors errors and exceptions and reports them to Rollbar
Gearman Jobserver Integration
Creates & updates issues on a GitLab repository from Symfony2 exceptions
统计信息
- 总下载量: 1.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-06