Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit47d5e6b

Browse files
committed
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
1 parentaf6b25b commit47d5e6b

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
returnarray(
7778
array('id',array(newType(Type::BUILTIN_TYPE_INT))),
7879
array('guid',array(newType(Type::BUILTIN_TYPE_STRING))),
80+
array('bigint',array(newType(Type::BUILTIN_TYPE_STRING))),
7981
array('float',array(newType(Type::BUILTIN_TYPE_FLOAT))),
8082
array('decimal',array(newType(Type::BUILTIN_TYPE_STRING))),
8183
array('bool',array(newType(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
namespaceSymfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures;
1313

14+
useDoctrine\ORM\MappingasORM;
1415
useDoctrine\ORM\Mapping\Column;
1516
useDoctrine\ORM\Mapping\Entity;
1617
useDoctrine\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)

[8]ページ先頭

©2009-2025 Movatter.jp