Fixed issues in Doctrine Helper

← Fixed issues in Doctrine Helper

Ashterix

docs: Doctrine section with Doctrine Behaviors and Doctrine Helper (uk + en)

en/docs/doctrine/doctrine-helper/known_issues/fixed.md new file +5 −0

1 + # Fixed issues in Doctrine Helper
2 +
3 + Bugs from previous versions and the version in which they were fixed. Open issues are on the [Open issues](/docs/doctrine/doctrine-helper/known_issues/open) page.
4 +
5 + <include>(.issues/dbal4-signatures.md)

en/docs/doctrine/doctrine-helper/known_issues/.issues/dbal4-signatures.md new file +16 −0

1 + ### AbstractEnumType is incompatible with DBAL 4
2 +
3 + :::success subtitle="Fixed in 1.0.1"
4 + 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.
5 + :::
6 +
7 + **Symptom.** With `doctrine/dbal` 4 a subclass of `AbstractEnumType` did not load:
8 +
9 + ```text
10 + Fatal error: Declaration of Ufo\DoctrineHelper\DBAL\AbstractEnumType::convertToDatabaseValue($value, ...)
11 + must be compatible with Doctrine\DBAL\Types\Type::convertToDatabaseValue(mixed $value, ...): mixed
12 + ```
13 +
14 + **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.
15 +
16 + **Fix.** 1.0.1 declares `convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed` and `convertToDatabaseValue(mixed $value, AbstractPlatform $platform): string|int`.