zhortein/symfony-toolbox-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

zhortein/symfony-toolbox-bundle

Composer 安装命令:

composer require zhortein/symfony-toolbox-bundle

包简介

This bundle is dedicated to Symfony applications and provide useful tools for your app.

README 文档

README

CI

English - French

English version

This Symfony bundle provides a set of utility services, enums, classes, and tools designed to enhance Symfony applications, making it easier to manage specific tasks such as server metrics, extended enum features, business date handling, and more. The toolbox offers optimized utilities for developers aiming to streamline their workflow with the latest Symfony features.

Available features

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Applications that use Symfony Flex

Just add the following in your composer.json file to have access to automatic Flex recipes:

"extra": {
    "symfony": {
        "allow-contrib": true,
        "endpoint": [
            "https://raw.githubusercontent.com/Zhortein/recipes-zhortein/flex/main/index.json",
            "flex://defaults"
        ]
    }
}

Then, open a command console, enter your project directory and execute:

composer require zhortein/symfony-toolbox-bundle

Applications that don't use Symfony Flex

Step 1: Create needed files

Two files are "needed":

  • config/packages/zhortein_symfony_toolbox.yaml: configuration file for the bundle features
  • config/routes/zhortein_symfony_toolbox.yaml: configuration file for the bundle features using routing (datatables...) The bundle, if not detected, will attempt to create the second file automatically.

You can create the following files by yourself:

# config/packages/zhortein_symfony_toolbox.yaml
zhortein_symfony_toolbox:
  datatables:
    css_mode: 'bootstrap'
    items_per_page: 10
    paginator: 'custom'
    export:
      enabled_by_default: true
      export_csv: true
      export_pdf: false
      export_excel: true
    ux_icons: true
    ux_icons_options:
      icon_first: 'bi:chevron-double-left'
      icon_previous: 'bi:chevron-left'
      icon_next: 'bi:chevron-right'
      icon_last: 'bi:chevron-double-right'
      icon_search: 'bi:search'
      icon_true: 'bi:check'
      icon_false: 'bi:x'
      icon_sort_neutral: 'mdi:sort'
      icon_sort_asc: 'bi:sort-alpha-down'
      icon_sort_desc: 'bi:sort-alpha-up'
      icon_filter: 'mi:filter'
      icon_export_csv: 'bi:filetype-csv'
      icon_export_pdf: 'bi:filetype-pdf'
      icon_export_excel: 'bi:filetype-xlsx'
# config/routes/zhortein_symfony_toolbox.yaml
zhortein_symfony_toolbox:
  resource: '@ZhorteinSymfonyToolboxBundle/config/routes.yaml'
Step 2: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require zhortein/symfony-toolbox-bundle
Step 3: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Zhortein\SymfonyToolboxBundle\ZhorteinSymfonyToolboxBundle::class => ['all' => true],
];

Usage

Each feature listed in the introduction above links to its dedicated documentation page. There, you’ll find detailed usage examples, configuration notes, and other information tailored for efficient integration in Symfony projects.

Contributing

Contributions are welcome! If you’d like to contribute to this project, please:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/my-feature).
  3. Commit your changes (git commit -m "Add my feature").
  4. Push to the branch (git push origin feature/my-feature).
  5. Open a pull request.

All contributions should adhere to the project’s coding standards and follow the conventional commit guidelines.

License

This bundle is licensed under the GPL-3.0 License. You are free to use, modify, and distribute this bundle under the terms of this license.

Credits

Developed and maintained by David RENARD. Special thanks to contributors and the Symfony community for their ongoing support and resources.

Version Française

Ce bundle Symfony fournit un ensemble de services utilitaires, d'enums, de classes et d'outils conçus pour améliorer les applications Symfony en facilitant la gestion de tâches spécifiques telles que les métriques serveur, les fonctionnalités étendues des enums, la gestion des dates d'affaires, et bien plus. La toolbox propose des utilitaires optimisés pour les développeurs souhaitant rationaliser leur flux de travail avec les dernières fonctionnalités de Symfony.

Fonctionnalités disponibles

Installation

Assurez-vous que Composer est installé globalement, comme expliqué dans le chapitre d'installation de la documentation de Composer.

Applications qui utilisent Symfony Flex

Ajoutez simplement ce qui suit dans votre fichier composer.json :

"extra": {
    "symfony": {
        "allow-contrib": true,
        "endpoint": [
            "https://raw.githubusercontent.com/Zhortein/recipes-zhortein/flex/main/index.json",
            "flex://defaults"
        ]
    }
}

Puis, uuvrez une console de commande, accédez au répertoire de votre projet, et exécutez :

composer require zhortein/symfony-toolbox-bundle

Applications qui n'utilisent pas Symfony Flex

Etape 1: Création des fichiers requis

Deux fichiers sont "requis":

  • config/packages/zhortein_symfony_toolbox.yaml: le fichier de configuration des fonctionnalités du bundle
  • config/routes/zhortein_symfony_toolbox.yaml: le fichier de configuration des routes pour les fonctionnalités du bundle qui utilisent le routage (datatables) Si non détecté, le bundle tentera de créer automatiquement le second fichier.

Vous devez donc créer les fichiers suivant par vous-même :

# config/packages/zhortein_symfony_toolbox.yaml
zhortein_symfony_toolbox:
  datatables:
    css_mode: 'bootstrap'
    items_per_page: 10
    paginator: 'custom'
    export:
      enabled_by_default: true
      export_csv: true
      export_pdf: false
      export_excel: true
    ux_icons: true
    ux_icons_options:
      icon_first: 'bi:chevron-double-left'
      icon_previous: 'bi:chevron-left'
      icon_next: 'bi:chevron-right'
      icon_last: 'bi:chevron-double-right'
      icon_search: 'bi:search'
      icon_true: 'bi:check'
      icon_false: 'bi:x'
      icon_sort_neutral: 'mdi:sort'
      icon_sort_asc: 'bi:sort-alpha-down'
      icon_sort_desc: 'bi:sort-alpha-up'
      icon_filter: 'mi:filter'
      icon_export_csv: 'bi:filetype-csv'
      icon_export_pdf: 'bi:filetype-pdf'
      icon_export_excel: 'bi:filetype-xlsx'
# config/routes/zhortein_symfony_toolbox.yaml
zhortein_symfony_toolbox:
  resource: '@ZhorteinSymfonyToolboxBundle/config/routes.yaml'
Etape 2: Téléchargez le bundle

Ouvrez une console de commande, accédez au répertoire de votre projet, et exécutez la commande suivante pour télécharger la dernière version stable du bundle :

composer require zhortein/symfony-toolbox-bundle
Etape 3: Activez le Bundle

Ensuite, activez le bundle en l'ajoutant dans la liste des bundles connus dans le fichier config/bundles.php de votre projet :

// config/bundles.php

return [
    // ...
    Zhortein\SymfonyToolboxBundle\ZhorteinSymfonyToolboxBundle::class => ['all' => true],
];

Utilisation

Chaque fonctionnalité listée dans l'introduction renvoie vers une page de documentation dédiée. Vous y trouverez des exemples détaillés d'utilisation, des notes de configuration, et d'autres informations pour une intégration efficace dans vos projets Symfony.

Contribution

Les contributions sont les bienvenues ! Si vous souhaitez contribuer à ce projet, veuillez :

  1. Faire un fork du dépôt.
  2. Créer une branche pour votre fonctionnalité (git checkout -b feature/ma-fonctionnalite).
  3. Commiter vos changements (git commit -m "Ajout de ma fonctionnalité").
  4. Pousser la branche (git push origin feature/ma-fonctionnalite).
  5. Ouvrir une pull request.

Toutes les contributions doivent respecter les standards de codage du projet et suivre les directives des commits conventionnels.

Licence

Ce bundle est sous licence GPL-3.0. Vous êtes libre d'utiliser, de modifier et de distribuer ce bundle selon les termes de cette licence.

Crédits

Développé et maintenu par David RENARD. Un grand merci aux contributeurs et à la communauté Symfony pour leur soutien et leurs ressources.

zhortein/symfony-toolbox-bundle 适用场景与选型建议

zhortein/symfony-toolbox-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 129 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「symfony」 「bundle」 「tools」 「tool」 「utils」 「misc」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 zhortein/symfony-toolbox-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-11-14