You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctrine DBAL 2.10 is deprecating the constants in the \Doctrine\DBAL\Types\Type abstract class in favor of equivalent constants in \Doctrine\DBAL\Types\Types (most constants have the same name, but a few of the date-related types have _MUTABLE added in the constant name to make them symmetric with the _IMMUTABLE date types);
Diff
use Doctrine\DBAL\Types\Type;
+use Doctrine\DBAL\Types\Type;-$query->setParameter($a, Type::BOOLEAN);-$query->setParameter($b, Type::DATE);+$query->setParameter($a, Types::BOOLEAN);+$query->setParameter($b, Types::DATE_MUTABLE);
Removing the existing use statement for Doctrine\DBAL\Types\Type might a nice bonus, but it requires to be careful (as it could be used for other things than referencing constants), and PHP-CS-Fixer can already be used to clean that after the migration anyway.
The text was updated successfully, but these errors were encountered:
stof
changed the title
[idea] reactor to migrate from the deprecate constants of \Doctrine\DBAL\Types\Type
[idea] reactor to migrate from the deprecated constants of \Doctrine\DBAL\Types\Type
Nov 7, 2019
It's very hard to deduce migration path from the upgrade file, as FQN classes are missing and wording is often ambiguous. Diff examples would be more helpful.
I've started first set at #2514
I'd be happy if you check it and fix/complete, if you find a way
Doctrine DBAL 2.10 is deprecating the constants in the
\Doctrine\DBAL\Types\Type
abstract class in favor of equivalent constants in\Doctrine\DBAL\Types\Types
(most constants have the same name, but a few of the date-related types have_MUTABLE
added in the constant name to make them symmetric with the_IMMUTABLE
date types);Diff
Removing the existing use statement for
Doctrine\DBAL\Types\Type
might a nice bonus, but it requires to be careful (as it could be used for other things than referencing constants), and PHP-CS-Fixer can already be used to clean that after the migration anyway.The text was updated successfully, but these errors were encountered: