定制 reusablecog/error-dictionary-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

reusablecog/error-dictionary-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require reusablecog/error-dictionary-bundle

包简介

README 文档

README

Error Dictionary Bundle



The Error Dictionary Bundle is a Symfony bundle designed to simplify the generation of error management pages. It allows you to display error descriptions, associated codes, exceptions, and response codes by simply filling out a YAML configuration file.

Installation

You can install the ErrorDictionary using Composer:

composer require reusablecog/error-dictionary-bundle

Features

  • Error Definition Configuration: Define error codes, labels, descriptions, categories, status codes, and associated exceptions in a YAML configuration file.
  • Easy Integration: Seamlessly integrate error management pages into your Symfony project.

Usage

To use the Error Dictionary Bundle, you need to define error codes and their details in the configuration file. Here's an example:

#config/packages/error_dictionary.yaml
error_dictionary:
    error_definition:
        '999999':
            label: The resource was not found in database.
            description: The resource was not found in database.
            category: Home
            status_code: 404
            exception: ResourceNotFound
        '9E8302':
            label: Incorrect payload for the registration API.
            description: In the registration API all fields are required.
            category: Account
            status_code: 400
            exception: BadRequest

Versions

PHP version Symfony version Composer flags
>= 8.1 6.x / 7.x

Contributing

If you encounter any issues or would like to contribute to Error Dictionary Bundle, feel free to create a pull request or submit an issue on the GitHub repository.

License

The Error Dictionary Bundle is open-source software licensed under the MIT license.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-05