PHPackages                             zhortein/symfony-toolbox-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zhortein/symfony-toolbox-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

zhortein/symfony-toolbox-bundle
===============================

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

1.1.4(11mo ago)0129GPL-3.0-or-laterPHPPHP &gt;=8.3CI passing

Since Nov 14Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/Zhortein/symfony-toolbox-bundle)[ Packagist](https://packagist.org/packages/zhortein/symfony-toolbox-bundle)[ Docs](https://www.david-renard.fr)[ RSS](/packages/zhortein-symfony-toolbox-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (19)Versions (8)Used By (0)

Zhortein / Symfony Toolbox Bundle
=================================

[](#zhortein--symfony-toolbox-bundle)

[![CI](https://github.com/Zhortein/symfony-toolbox-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/Zhortein/symfony-toolbox-bundle/actions/workflows/ci.yml)

[English](#english-version) - [French](#version-fran%C3%A7aise)

English version
---------------

[](#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

[](#available-features)

- [Business DateTime handling](./docs/en/BusinessDateTime.md): holidays, working days, and more
- [Color Tools](./docs/en/ColorTools.md): RGB to Hex, Hex to RGB, color palette, etc.
- [Data Types Validation](./docs/en/DataTypeValidator.md): validate PHP data using Symfony constraint validators
- [DateInterval Tools](./docs/en/TimeToolBox.md): add, subtract, normalize, and more
- [DateTime Manipulation Tools](./docs/en/DateToolBox.md)
- [Enums and Enum Tools](./docs/en/Enums.md): Days, Months, Actions, Translatable Enums, and more
- [File Content Getter](./docs/en/FileContentGetter.md): retrieve and save file content locally
- [EXIF Info Handling](./docs/en/FileExifInfo.md): extract EXIF information from images
- [File Handling Tools](./docs/en/FileToolBox.md): recursive folder removal, large file reading, folder copying, etc.
- [Measure Converters](./docs/en/MeasureConverter.md): display human-readable file sizes, convert between km/miles, kg/pounds, etc.
- [Server Metrics](./docs/en/ServerMetric.md): retrieve various server metrics
- [String Manipulation Tools](./docs/en/StringTools.md): sanitize strings and filenames, remove diacritics, count words, truncate text, and more.
- [Datatables](./docs/en/Datatables.md): generate datatables

### Installation

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

#### Applications that use Symfony Flex

[](#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

[](#applications-that-dont-use-symfony-flex)

##### Step 1: Create needed files

[](#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

[](#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

[](#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

[](#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
------------

[](#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](https://www.conventionalcommits.org/) guidelines.

License
-------

[](#license)

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

Credits
-------

[](#credits)

Developed and maintained by [David RENARD](https://github.com/Zhortein). Special thanks to contributors and the Symfony community for their ongoing support and resources.

---

Version Française
-----------------

[](#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

[](#fonctionnalités-disponibles)

- [Gestion des dates d'affaires](./docs/fr/BusinessDateTime.md) : jours fériés, jours ouvrables, etc.
- [Outils de couleur](./docs/fr/ColorTools.md) : conversion RGB vers Hex, Hex vers RGB, palettes de couleurs, etc.
- [Validation des types de données](./docs/fr/DataTypeValidator.md) : validez vos données PHP en utilisant les validateurs de contraintes Symfony
- [Outils pour DateInterval](./docs/fr/TimeToolBox.md) : addition, soustraction, normalisation, etc.
- [Outils pour manipuler les DateTime](./docs/fr/DateToolBox.md)
- [Enums utiles et outils pour les enums](./docs/fr/Enums.md) : jours, mois, actions, enums traduisibles, etc.
- [Gestionnaire de contenu de fichiers](./docs/fr/FileContentGetter.md) : récupération et sauvegarde du contenu de fichiers en local
- [Gestion des informations EXIF](./docs/fr/FileExifInfo.md) : extraction des informations EXIF des images
- [Outils de gestion de fichiers](./docs/fr/FileToolBox.md) : suppression de dossiers de manière récursive, lecture de gros fichiers, copie de dossiers, etc.
- [Convertisseurs de mesures](./docs/fr/MeasureConverter.md) : affichage de la taille de fichiers en format lisible, conversion entre km et miles, kg et livres, etc.
- [Métriques serveur](./docs/fr/ServerMetric.md) : récupération de diverses métriques serveur
- [Outils de manipulation de chaînes](./docs/fr/StringTools.md) : assainissement des chaînes et des noms de fichiers, suppression des diacritiques, comptage de mots, troncature de texte, etc.
- [Datatables](./docs/fr/Datatables.md) : générer des datatables

### Installation

[](#installation-1)

Assurez-vous que Composer est installé globalement, comme expliqué dans le [chapitre d'installation](https://getcomposer.org/doc/00-intro.md)de la documentation de Composer.

#### Applications qui utilisent Symfony Flex

[](#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

[](#applications-qui-nutilisent-pas-symfony-flex)

##### Etape 1: Création des fichiers requis

[](#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

[](#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

[](#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

[](#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
------------

[](#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](https://www.conventionalcommits.org/).

Licence
-------

[](#licence)

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

Crédits
-------

[](#crédits)

Développé et maintenu par [David RENARD](https://github.com/Zhortein). Un grand merci aux contributeurs et à la communauté Symfony pour leur soutien et leurs ressources.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance50

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~45 days

Total

6

Last Release

350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44929672bbed3e80606355419b928ded5440ec6260ecc1013bd543d7bc4d1ec5?d=identicon)[Zhortein](/maintainers/Zhortein)

---

Top Contributors

[![Zhortein](https://avatars.githubusercontent.com/u/82563246?v=4)](https://github.com/Zhortein "Zhortein (114 commits)")

---

Tags

symfonybundlesymfony-uxtooltoolsutilsToolboxmisc

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zhortein-symfony-toolbox-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zhortein-symfony-toolbox-bundle/health.svg)](https://phpackages.com/packages/zhortein-symfony-toolbox-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
