-
Notifications
You must be signed in to change notification settings - Fork 2
Fix doctrine type mapping and sql declaration #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/DBAL/EnumType.php
Outdated
@@ -81,12 +81,18 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) | |||
/** {@inheritdoc} */ | |||
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) | |||
{ | |||
return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); | |||
return $this->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break everything if there is no type alias present in database for this type
4f18a21
to
b69eff6
Compare
Review, please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments. All other looks good
if (isset($configs['enum_name_type_mapping'])) { | ||
$enumNameTypeMapping = (bool)$configs['enum_name_type_mapping']; | ||
} else { | ||
$enumNameTypeMapping = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use ??
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already removed at all
@@ -15,6 +15,9 @@ public function getConfigTreeBuilder(): TreeBuilder | |||
|
|||
$root = $builder->root('lamoda_enum'); | |||
|
|||
$root->children()->scalarNode('enum_name_type_mapping') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
booleanNode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
b69eff6
to
c226679
Compare
Thank you, @dedpikhto |
No description provided.