Skip to content

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

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

dedpikhto
Copy link
Contributor

No description provided.

@@ -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;
Copy link
Contributor

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

@dedpikhto dedpikhto force-pushed the fix-type-mapping-and-sql-declaration branch 2 times, most recently from 4f18a21 to b69eff6 Compare August 1, 2019 15:32
@dedpikhto
Copy link
Contributor Author

Review, please

@dedpikhto dedpikhto closed this Aug 1, 2019
@dedpikhto dedpikhto reopened this Aug 1, 2019
Copy link
Contributor

@scaytrase scaytrase left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use ?? here

Copy link
Contributor Author

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

booleanNode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@dedpikhto dedpikhto force-pushed the fix-type-mapping-and-sql-declaration branch from b69eff6 to c226679 Compare August 1, 2019 19:21
@scaytrase scaytrase merged commit eb5ec6e into master Aug 2, 2019
@scaytrase scaytrase deleted the fix-type-mapping-and-sql-declaration branch August 2, 2019 06:58
@scaytrase
Copy link
Contributor

Thank you, @dedpikhto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants