GsId 2.0.0 is a major release. It cleans up integration namespaces and removes historical compatibility classes.
The following class was permanently removed:
GalacticShrine\GsId\GsIdDoctrineTypeUse this class instead:
GalacticShrine\GsId\Bridge\Doctrine\Types\GsidTypeuse GalacticShrine\GsId\GsIdDoctrineType;
#[ORM\Column(type: GsIdDoctrineType::Name)]
private ?GsId $id = null;use GalacticShrine\GsId\Bridge\Doctrine\Types\GsidType;
#[ORM\Column(type: GsidType::Name)]
private ?GsId $id = null;You can also use the type name directly:
#[ORM\Column(type: 'gsid')]
private ?GsId $id = null;The Symfony bundle automatically registers the gsid DBAL type when DoctrineBundle is installed.
The following class was renamed and moved:
GalacticShrine\GsId\GsIdSymfonyOptionsConfiguratorNew name:
GalacticShrine\GsId\Symfony\GsIdOptionsConfiguratorIf you use the Symfony bundle, you normally do not need to change anything: the bundle registers this service automatically.
If you use the no-bundle mode, update config/services.gsid.yaml:
services:
GalacticShrine\GsId\Symfony\GsIdOptionsConfigurator:
arguments:
$options:
default_case: Lower
default_text_format: N
default_json_format: D
default_database_format: N
lock: true
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 4096 }The following class was renamed and moved:
GalacticShrine\GsId\GsIdSymfonyUidBridgeNew name:
GalacticShrine\GsId\Symfony\Bridge\GsIdToUiduse GalacticShrine\GsId\GsIdSymfonyUidBridge;use GalacticShrine\GsId\Symfony\Bridge\GsIdToUid;The name GsIdToUid is intentional. GsIdToUuid was not used because GsId is a 256-bit identifier, while a standard UUID is a 128-bit identifier.
# config/packages/gsid.yaml
gsid:
default_case: Lower
default_text_format: N
default_json_format: D
default_database_format: N
lock: trueThe 2.0 recipe is located in:
flex-recipes/galactic-shrine/gsid/2.0/It is meant to be published in a public or private Symfony Flex recipe repository. Once published, it can enable the bundle and copy config/packages/gsid.yaml into the consumer Symfony project.
composer dump-autoload
composer lint
composer test