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
Jira issue originally created by user danny.vandersluijs:
When having a custom mapping type Filter
<?php
namespace MyProject\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use MyProject\Types\Filter as FilterType;
class Filter extends Type
{
const TYPE = 'filter';
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return new FilterType($value);
}
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
return (string) $value;
}
public function getName()
{
return Filter::TYPE;
}
}
The cli command orm:schema-tool:update keeps outputting the changes:
ALTERTABLE my_table ALTER filter TYPE VARCHAR(255);
ALTERTABLE my_table ALTER filter DROP DEFAULT;
Jira issue originally created by user danny.vandersluijs:
When having a custom mapping type Filter
The cli command orm:schema-tool:update keeps outputting the changes:
When doing some debugging I've found this is caused by //lib/Doctrine/DBAL/Schema/Comparator.php at line 429
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/Comparator.php#L429
Where the compared values are:
Doctrine\DBAL\Types\StringType vs MyProject\DBAL\Types\Filter
In the application bootstrap the custom type is registered as a type, and is registered as a doctrine type mapping
The text was updated successfully, but these errors were encountered: