8000 [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be con… · symfony/symfony@47d5e6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 47d5e6b

Browse files
committed
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
1 parent af6b25b commit 47d5e6b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ private function getPhpType($doctrineType)
174174
{
175175
switch ($doctrineType) {
176176
case DBALType::SMALLINT:
177-
case DBALType::BIGINT:
178177
case DBALType::INTEGER:
179178
return Type::BUILTIN_TYPE_INT;
180179

181180
case DBALType::FLOAT:
182181
return Type::BUILTIN_TYPE_FLOAT;
183182

183+
case DBALType::BIGINT:
184184
case DBALType::STRING:
185185
case DBALType::TEXT:
186186
case DBALType::GUID:
@@ -196,9 +196,6 @@ private function getPhpType($doctrineType)
196196

197197
case DBALType::OBJECT:
198198
return Type::BUILTIN_TYPE_OBJECT;
199-
200-
default:
201-
return;
202199
}
203200
}
204201
}

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function testGetProperties()
5555
'bool',
5656
'binary',
5757
'customFoo',
58+
'bigint',
5859
'foo',
5960
'bar',
6061
'indexedBar',
@@ -76,6 +77,7 @@ public function typesProvider()
7677
return array(
7778
array('id', array(new Type(Type::BUILTIN_TYPE_INT))),
7879
array('guid', array(new Type(Type::BUILTIN_TYPE_STRING))),
80+
array('bigint', array(new Type(Type::BUILTIN_TYPE_STRING))),
7981
array('float', array(new Type(Type::BUILTIN_TYPE_FLOAT))),
8082
array('decimal', array(new Type(Type::BUILTIN_TYPE_STRING))),
8183
array('bool', array(new Type(Type::BUILTIN_TYPE_BOOL))),

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

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

14+
use Doctrine\ORM\Mapping as ORM;
1415
use Doctrine\ORM\Mapping\Column;
1516
use Doctrine\ORM\Mapping\Entity;
1617
use Doctrine\ORM\Mapping\Id;
@@ -90,5 +91,10 @@ class DoctrineDummy
9091
*/
9192
private $customFoo;
9293

94+
/**
95+
* @Column(type="bigint")
96+
*/
97+
private $bigint;
98+
9399
public $notMapped;
94100
}

0 commit comments

Comments
 (0)
0