[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
This commit is contained in:
parent
af6b25b28c
commit
47d5e6b82c
@ -174,13 +174,13 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE
|
||||
{
|
||||
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:
|
||||
@ -196,9 +196,6 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE
|
||||
|
||||
case DBALType::OBJECT:
|
||||
return Type::BUILTIN_TYPE_OBJECT;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ class DoctrineExtractorTest extends TestCase
|
||||
'bool',
|
||||
'binary',
|
||||
'customFoo',
|
||||
'bigint',
|
||||
'foo',
|
||||
'bar',
|
||||
'indexedBar',
|
||||
@ -76,6 +77,7 @@ class DoctrineExtractorTest extends TestCase
|
||||
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))),
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\Column;
|
||||
use Doctrine\ORM\Mapping\Entity;
|
||||
use Doctrine\ORM\Mapping\Id;
|
||||
@ -90,5 +91,10 @@ class DoctrineDummy
|
||||
*/
|
||||
private $customFoo;
|
||||
|
||||
/**
|
||||
* @Column(type="bigint")
|
||||
*/
|
||||
private $bigint;
|
||||
|
||||
public $notMapped;
|
||||
}
|
||||
|
Reference in New Issue
Block a user