noflash/grumpy-error-bundle
Composer 安装命令:
composer require noflash/grumpy-error-bundle
包简介
Make your error pages just a bit more grumpy
README 文档
README
What this bundle does?
Your day can always be a bit better more grumpy. This bundle simply adds a well-known and beloved cat to your error
pages. It will greet scoff you in different ways and will not let you pet it - whether you're dreading on a leagy
PHP 5.6 project or playing with a shiny new PHP 8 toy.
Why and how?!
The idea originated around a decade ago, back in the Symfony 2 days. While we all love the little happy ghost, after long hours of debugging of the mercator projection calculation code the happiness in our team dwindled. So, instead of being productive I decided to add a funny image to our error messages... and people wonder why developers are strange. I hope my old dev team doesn't hate me to this day :D
On the serious note, being nostalgic and going through old photos, I decided to recreate the old hack as a bundle which supports a wide range of PHP and Symfony versions, for all of us stuck maintaining ancient projects.
Requirements
- PHP: 5.5+/7.0+/8.0+
- Symfony: v3.3 - 6.2+
- You can adapt it easily to <3.3, but the design of the page changed. If you're a poor soul working with such an old version, please create an issue - I will add a version for older Symfony releases.
Installation
- Add package via composer:
composer require noflash/grumpy-error-bundle - If you're you're using Symfony Flex (default since v4.0) you're ready to go. Otherwise, you may need to add the
bundle to your configuration:
- If you have
config/bundles.php, addNoFlash\GrumpyError\GrumpyErrorBundle::class => ['all' => true]there - For old directory structure (generally pre-4.0) add
new NoFlash\GrumpyError\GrumpyErrorBundle()toapp/AppKernel.phpin$bundles
- If you have
Tested Symfony Versions
Things has changed over the years, but legacy never dies. Thus, this bundle was tested with:
- Symfony 3.3.x on PHP 5.6 & 7.2 (initial version with new redesign)
- Symfony 4.1.x on PHP 7.2 (changed controller call syntax)
- Symfony 4.4.x on PHP 7.2 (changed how overriding exception/error controller is done)
- Symfony 6.2.x on PHP 8.2 (the newest version at the time of writing)
Note: For Symfony 4.1, if you're getting an error The service "web_profiler.controller.profiler" has a dependency on a non-existent service "twig".
you need to install symfony/twig-bundle due to a Symfony bug.
noflash/grumpy-error-bundle 适用场景与选型建议
noflash/grumpy-error-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.7k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2023 年 01 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 noflash/grumpy-error-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 noflash/grumpy-error-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-01-14
