bigfork/silverstripe-fail-whale
Composer 安装命令:
composer require bigfork/silverstripe-fail-whale
包简介
SilverStripe error pages, just without the pages.
README 文档
README
SilverStripe error pages, just without the pages.
What is this?
CMS-editable error pages (404, 500 etc), without clogging up the site tree and confusing content authors who rarely (if ever) need to edit them. Also works without the CMS module installed.
How does it work?
Error documents are DataObjects which can be edited via the “Settings” area of the CMS. There is no versioning or draft/live stages, so all changes are published immediately. On encountering an error, SilverStripe will look for a matching error document and render it if one is found.
Cached content is still stored in assets/error-<code>.html files, and it’s still possible to use custom templates if required.
When the CMS module is installed, PageController::init() will be called before rendering the error document to ensure any requirements are included. If you need different behaviour in this method in the event of an error, you can check if ($this->data()->ClassName === ErrorDocument::class).
How do I use custom templates?
As an example, in the event of a 404 error this module will look for the following templates:
<theme>/templates/Bigfork/SilverStripeFailWhale/Model/Layout/ErrorDocument_404.ss<theme>/templates/Bigfork/SilverStripeFailWhale/Model/Layout/ErrorDocument.ss<theme>/templates/Bigfork/SilverStripeFailWhale/Model/ErrorDocument.ss
If none of the above templates are present and you have the CMS module installed, the module will fall back to using the default Page templates.
Subsites
By default all the subsites will use the main site’s error documents. If you want each site to have its own error pages, this should get you cooking:
Bigfork\SilverStripeFailWhale\Model\ErrorDocument: enable_subsites: true has_one: Subsite: SilverStripe\Subsites\Model\Subsite
What’s with the name?
The “Fail Whale” is an illustration of a white beluga whale held up by a flock of birds, originally named “Lifting a Dreamer”, illustrated by Australian artist Yiying Lu. It was used during periods of downtime by the social networking service Twitter.
h/t to @andrewandante for the suggestion!
bigfork/silverstripe-fail-whale 适用场景与选型建议
bigfork/silverstripe-fail-whale 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.42k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2019 年 01 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「errors」 「error」 「silverstripe」 「errorpage」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bigfork/silverstripe-fail-whale 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bigfork/silverstripe-fail-whale 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bigfork/silverstripe-fail-whale 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bootstraps errors and handles them via reporters and renderers
Asynchronous Sentry for Symfony - Fire and forget
Analytics chooser extensions for site settings.
PHP Error Handler module that captures and displays all throwable errors in a given format, making debugging easier and more efficient
Monitors errors and exceptions and reports them to Rollbar
统计信息
- 总下载量: 20.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 14
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-01-28