Fixed issues in Doctrine Helper

Fixed issues in Doctrine Helper

Bugs from previous versions and the version in which they were fixed. Open issues are on the Open issues page.

AbstractEnumType is incompatible with DBAL 4

Fixed in 1.0.1

Affected versions: 1.0.0. Verified by running the code of tags 1.0.0 and 1.0.1 with DBAL 4.5 on PHP 8.4.

Symptom. With doctrine/dbal 4 a subclass of AbstractEnumType did not load:

Fatal error: Declaration of Ufo\DoctrineHelper\DBAL\AbstractEnumType::convertToDatabaseValue($value, ...)
must be compatible with Doctrine\DBAL\Types\Type::convertToDatabaseValue(mixed $value, ...): mixed

Cause. In 1.0.0 convertToPHPValue() and convertToDatabaseValue() had no return type, while the corresponding Doctrine\DBAL\Types\Type methods in DBAL 4 declare one.

Fix. 1.0.1 declares convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed and convertToDatabaseValue(mixed $value, AbstractPlatform $platform): string|int.