Skip to content

[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string #22988

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
Jun 2, 2017
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 @@ -174,13 +174,13 @@ private function getPhpType($doctrineType)
{
switch ($doctrineType) {
case DBALType::SMALLINT:
case DBALType::BIGINT:
case DBALType::INTEGER:
return Type::BUILTIN_TYPE_INT;

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

case DBALType::BIGINT:
case DBALType::STRING:
case DBALType::TEXT:
case DBALType::GUID:
Expand All @@ -196,9 +196,6 @@ private function getPhpType($doctrineType)

case DBALType::OBJECT:
return Type::BUILTIN_TYPE_OBJECT;

default:
return;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function testGetProperties()
'bool',
'binary',
'customFoo',
'bigint',
'foo',
'bar',
'indexedBar',
Expand All @@ -76,6 +77,7 @@ public function typesProvider()
return array(
array('id', array(new Type(Type::BUILTIN_TYPE_INT))),
array('guid', array(new Type(Type::BUILTIN_TYPE_STRING))),
array('bigint', 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))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures;

use Doctrine\ORM\Mapping as ORM;
Copy link
Member

Choose a reason for hiding this comment

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

should be removed isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed

Copy link
Member

Choose a reason for hiding this comment

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

ok, removed

use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
Expand Down Expand Up @@ -90,5 +91,10 @@ class DoctrineDummy
*/
private $customFoo;

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

public $notMapped;
}