定制 dev-fighters/back-utils 二次开发

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

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

dev-fighters/back-utils

Composer 安装命令:

composer require dev-fighters/back-utils

包简介

mini-framework for Dev Fighters

README 文档

README

A mini-framework library providing utilities for Dev Fighters Symfony applications, including mailer services, data integrity checks, and standardized application entities.

REQUIREMENTS

  • Requires PHP >= 8.4
  • Symfony 7.3
  • Required PHP Extensions:
    • bcmath, ctype, curl, fileinfo, gd, iconv, intl, json, soap, zlib, pdo

Features

  • Mailer Service: Integrated email sending with test mode support
  • Data Integrity Checker: Validate database and application data consistency
  • Standard App Entities: Pre-configured entities for countries, currencies, languages, timezones, and administrative areas
  • PDF Generator: Generate PDFs from Twig templates with DomPDF (stream or download)
  • API Platform Integration: Built-in support for API Platform 4.2
  • JWT Authentication: Integrated with Lexik JWT Authentication Bundle
  • Doctrine Fixtures: Sample data loading capabilities
  • Excel Support: PHPSpreadsheet integration for spreadsheet operations

INSTALLATION

  • Install with composer: composer require dev-fighters/back-utils

Configuration

Environment Variables

Add the following variables to your .env file:

  • MAILER_DSN=[STRING] # e.g., smtp://user:pass@smtp.example.com:port
  • MAILER_SENDER_EMAIL=[STRING] # Sender email e.g., noreply@example.com
  • MAILER_SENDER_NAME=[STRING] # Sender name e.g., "Dev Fighters"
  • MAILER_TEST_ACTIVATE=[BOOLEAN] # TRUE = MODE TEST ACTIVATED [DEFAULT : TRUE] Set to false in production
  • MAILER_TEST_RECIPIENT=[STRING] # Surpassed recipient. All emails redirected here when test mode is active

Note: When MAILER_TEST_ACTIVATE=true, all outgoing emails will be redirected to MAILER_TEST_RECIPIENT instead of the intended recipients. This is useful for development and testing.

config/services.yaml

services :
    DevFighters\Utils\:
        resource: '../vendor/dev-fighters/back-utils/src/'
        autowire: true
        autoconfigure: true

config/packages/doctrine.yaml

doctrine:
    orm:
        entity_managers:
            dql:
                string_functions:
                    replace: DoctrineExtensions\Query\Mysql\Replace
                    MONTH: DoctrineExtensions\Query\Mysql\Month
                    YEAR: DoctrineExtensions\Query\Mysql\Year
                    ROUND: DoctrineExtensions\Query\Mysql\Round
                    GROUP_CONCAT: DoctrineExtensions\Query\Mysql\GroupConcat
                numeric_functions:
                    RAND: DoctrineExtensions\Query\Mysql\Rand

Usage

Load Sample Data

  • php bin/console doctrine:fixtures:load --append --group=init

Check Data Integrity

Run the integrity checker to validate your database and application data:

  • php bin/console back-utils:check

This comand performs the following checks:

  • App Countries (validates against AppCountryEnum)
  • App Country Administrative Areas (validates against AppCountryAdministrativeAreaEnum)
  • App Currencies (validates against AppCurrencyEnum)
  • App Languages (validates against AppLanguageEnum)
  • App Timezones (validates against AppTimezoneEnum)

Available Entities

The library provides the following standard entities:

  • AppCountry - Country definitions
  • AppCountryAdministrativeArea - Administrative divisions (states, provinces, etc.)
  • AppCurrency - Currency definitions
  • AppLanguage - Language definitions
  • AppTimezone - Timezone configurations

Development

Docker Support

If you're developing this library locally with Docker:

cd .docker && docker compose up -d --build

Dependencies

Key dependencies include:

  • API Platform 4.2
  • Doctrine ORM 3.0
  • Symfony 7.3 components
  • Lexik JWT Authentication Bundle
  • PHPSpreadsheet 5.2

For the complete list, see composer.json.

Documentation

License

Proprietary - This software is the exclusive property of Dev Fighters. All rights reserved.

Unauthorized copying, distribution, modification, or use of this software, via any medium, is strictly prohibited without explicit written permission from Dev Fighters.

Authors

Dev Fighters

For more information or support, please contact the Dev Fighters team.

dev-fighters/back-utils 适用场景与选型建议

dev-fighters/back-utils 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 196 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dev-fighters/back-utils 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dev-fighters/back-utils 我们能提供哪些服务?
定制开发 / 二次开发

基于 dev-fighters/back-utils 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2025-10-20