lubna/custom-error-bundle
最新稳定版本:v1.1.0
Composer 安装命令:
composer require lubna/custom-error-bundle
包简介
Symfony bundle to customize and override default error pages (404, 403, 500, 401) with Twig templates and error controller support.
README 文档
README
Customizable error pages for Symfony 6.2 and 7+
This bundle replaces Symfony’s default error pages (404, 403, 500, etc.) with user-friendly Twig templates.
Features
- Handles 404, 403, 500, 401 and other HTTP errors
- Shows a login prompt for 401 errors
- Custom Twig templates
Installation
Install the bundle via Composer:
composer require lubna/custom-error-bundle
🔧 Configuration
1. Register the bundle
In config/bundles.php:
return [
CustomError\Bundle\CustomErrorBundle::class => ['all' => true],
];
If you want the bundle to be active only in production, you can use:
return [
CustomError\Bundle\CustomErrorBundle::class => ['prod' => true],
];
2. Register the error controller
In config/services.yaml:
services:
CustomError\Bundle\Controller\ErrorController:
tags: ['controller.service_arguments']
Author
Made with ❤️ by Lubna
Feel free to contribute, fork, or open issues.
统计信息
- 总下载量: 228
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-04