定制 php-bug-catcher/skeleton 二次开发

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

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

php-bug-catcher/skeleton

最新稳定版本:1.0.2

Composer 安装命令:

composer create-project php-bug-catcher/skeleton

包简介

Project template for starting your new project based on the Bug Catcher

README 文档

README

Tests

Catch every bug in all your PHP applications in one place


Installation

By composer

composer create-project php-bug-catcher/skeleton your-project-name

Manual

Create blank symfony project

composer create-project symfony/skeleton:"7.1.*" bug-catcher

Add depenedencies

composer require php-bug-catcher/bug-catcher

Enable bundle if not already enabled

//config/bundles.php
return [
    ...
    BugCatcher\BugCatcherBundle::class => ['all' => true],
    ...
];

Configuration

setup packages

#config/packages/twig.yaml
twig:
  #...
  form_themes: [ '@EasyAdmin/symfony-form-themes/bootstrap_5_layout.html.twig' ]
  globals:
    logo: '%logo%'
    app_name: '%env(APP_NAME)%'
#config/packages/twig_component.yaml
twig_component:
  #...
  defaults:
    #...
    BugCatcher\Twig\Components\: '@BugCatcher/components/'
#config/packages/webpack_encore.yaml
webpack_encore:
  #...
  builds:
    bug_catcher: '%kernel.project_dir%/public/bundles/bugcatcher/'
framework:
  #...
  assets:
    packages:
      app:
        json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
      bug_catcher:
        json_manifest_path: '%kernel.project_dir%/public/bundles/bugcatcher/manifest.json'

Security

follow the instructions in the Symfony docs Modify these:

#config/packages/security.yaml
security:
  #...
  providers:
    app_user_provider:
      entity:
        class: BugCatcher\Entity\User
        property: email
  firewalls:
    #...
    api:
      pattern: ^/api/
      stateless: true
    main:
      #...
      provider: app_user_provider
      form_login:
        login_path: bug_catcher.security.login
        check_path: bug_catcher.security.login
        enable_csrf: true
      logout:
        path: bug_catcher.security.logout
  access_control:
    - { path: ^/login$, role: PUBLIC_ACCESS }
    - { path: ^/api, roles: PUBLIC_ACCESS }
    - { path: ^/admin, roles: ROLE_ADMIN }
    - { path: ^/detail, roles: ROLE_DEVELOPER }
    - { path: ^/_components/LogList/clearAll, roles: ROLE_DEVELOPER }
    - { path: ^/_components/LogList/clearOne, roles: ROLE_DEVELOPER }
    - { path: ^/, roles: ROLE_CUSTOMER }
  role_hierarchy:
    ROLE_ADMIN: ROLE_DEVELOPER
    ROLE_DEVELOPER: ROLE_CUSTOMER
    ROLE_CUSTOMER: ROLE_USER
#config/packages/doctrine.yaml
doctrine:
  orm:
    #...
    dql:
      string_functions:
        TYPE: BugCatcher\Extension\DQL\TypeFunction
#config/packages/api_platform.yaml
api_platform:
  #...
  formats:
    #...
    json: [ 'application/json' ]

Routes

#config/routes/bug_catcher.yaml
_bug_catcher:
  resource: "@BugCatcherBundle/config/routes.php"
  prefix: /

Download icons

php bin/console ux:icons:import pajamas:hamburger covid:virus-lab-research-magnifier-1 clarity:archive-line game-icons:magic-broom

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-02