Download the PHP package galactic-shrine/gsid without Composer
On this page you can find all versions of the php package galactic-shrine/gsid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download galactic-shrine/gsid
More information about galactic-shrine/gsid
Files in galactic-shrine/gsid
Package gsid
Short Description GsId 256-bit identifier system for Galactic-Shrine projects.
License MPL-2.0
Informations about the package gsid
GalacticShrine GsId pour PHP
Langues : Français · 日本語
GsId est une bibliothèque PHP pour créer, parser, valider, sérialiser et stocker des identifiants Galactic-Shrine de 256 bits.
Elle fournit un cœur PHP pur, un type Doctrine DBAL, un bundle Symfony optionnel, un bridge Symfony et une recipe Symfony Flex prête à publier.
Vue d’ensemble
| Élément | Valeur |
|---|---|
| Package | galactic-shrine/gsid |
| Version majeure | 2.0.1 |
| PHP | >= 8.1 |
| Licence | MPL-2.0 |
| Type d’identifiant | 256 bits / 32 octets / 64 caractères hexadécimaux |
| Format Doctrine | gsid |
| Bundle Symfony | GalacticShrine\GsId\Symfony\GsIdBundle |
Installation
Formats supportés
GsId supporte deux formats texte.
Format N
Format compact, sans séparateur :
Longueur : 64 caractères.
Format D
Format lisible avec séparateurs :
Groupe : 16-8-8-8-8-16.
Longueur : 69 caractères.
Utilisation PHP pure
Options globales
lock() empêche les modifications de configuration après l’initialisation de l’application.
Symfony avec bundle
Active le bundle si Symfony Flex ne le fait pas automatiquement :
Configuration recommandée :
Le bundle enregistre automatiquement le type Doctrine DBAL gsid si DoctrineBundle est présent.
Symfony sans bundle
Le fichier suivant est fourni comme configuration alternative :
Il permet d’enregistrer manuellement :
Ce mode est utile si tu veux utiliser Symfony sans activer GsIdBundle.
Doctrine DBAL
Depuis 2.0.0, le type Doctrine est dans le namespace bridge :
Exemple d’entité :
Tu peux aussi utiliser directement le nom du type :
Bridge Symfony
GsIdToUid fournit des conversions utiles pour les routes, DTO, formulaires ou serializers Symfony.
Le nom GsIdToUid est volontaire. GsIdToUuid serait trompeur, car un GsId est un identifiant 256 bits alors qu’un UUID standard est un identifiant 128 bits.
Symfony Flex recipe
Une recipe modèle est fournie ici :
Elle peut :
- activer
GsIdBundle; - copier
config/packages/gsid.yamldans le projet Symfony utilisateur.
Important : le dossier flex-recipes/ inclus dans ce dépôt est un modèle. Pour que Symfony Flex l’applique automatiquement lors d’un composer require, la recipe doit être publiée dans un dépôt Symfony Flex public ou privé.
Migration depuis 1.x
GsIdDoctrineType a été supprimé en 2.0.0.
Avant :
Après :
Voir UPGRADE-2.0.md.
Guides de migration disponibles : JP.
Développement
Licence
- Licence officielle :
LICENSE - Notice FR :
LICENSE.fr.md - Notice EN :
LICENSE.en.md - Notice ES :
LICENSE.es.md - Notice IT :
LICENSE.it.md - Notice JP :
LICENSE.jp.md
GsId is distributed under MPL-2.0.