Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string #19924

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
Sep 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ private function getPhpType($doctrineType)
return Type::BUILTIN_TYPE_INT;

case DBALType::FLOAT:
case DBALType::DECIMAL:
return Type::BUILTIN_TYPE_FLOAT;

case DBALType::STRING:
case DBALType::TEXT:
case DBALType::GUID:
case DBALType::DECIMAL:
return Type::BUILTIN_TYPE_STRING;

case DBALType::BOOLEAN:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public function testGetProperties()
'time',
'json',
'simpleArray',
'float',
'decimal',
'bool',
'binary',
'customFoo',
Expand All @@ -73,6 +75,8 @@ public function typesProvider()
return array(
array('id', array(new Type(Type::BUILTIN_TYPE_INT))),
array('guid', array(new Type(Type::BUILTIN_TYPE_STRING))),
array('float', array(new Type(Type::BUILTIN_TYPE_FLOAT))),
array('decimal', array(new Type(Type::BUILTIN_TYPE_STRING))),
array('bool', array(new Type(Type::BUILTIN_TYPE_BOOL))),
array('binary', array(new Type(Type::BUILTIN_TYPE_RESOURCE))),
array('json', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ class DoctrineDummy
*/
private $simpleArray;

/**
* @Column(type="float")
*/
private $float;

/**
* @Column(type="decimal", precision=10, scale=2)
*/
private $decimal;

/**
* @Column(type="boolean")
*/
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.