diff --git a/src/Propel/Generator/Model/PropelTypes.php b/src/Propel/Generator/Model/PropelTypes.php index 5431c9076..5782d1345 100644 --- a/src/Propel/Generator/Model/PropelTypes.php +++ b/src/Propel/Generator/Model/PropelTypes.php @@ -234,7 +234,7 @@ class PropelTypes /** * @var string */ - public const BIGINT_NATIVE_TYPE = 'string'; + public const BIGINT_NATIVE_TYPE = PHP_INT_SIZE === 8 ? 'int' : 'string'; /** * @var string diff --git a/tests/Propel/Tests/Generator/Model/ColumnTest.php b/tests/Propel/Tests/Generator/Model/ColumnTest.php index db3bfb663..efee98cea 100644 --- a/tests/Propel/Tests/Generator/Model/ColumnTest.php +++ b/tests/Propel/Tests/Generator/Model/ColumnTest.php @@ -702,7 +702,7 @@ public function provideMappingNumericTypes() ['SMALLINT', 'int', true], ['TINYINT', 'int', true], ['INTEGER', 'int', true], - ['BIGINT', 'string', false], + ['BIGINT', PHP_INT_SIZE === 8 ? 'int' : 'string', PHP_INT_SIZE === 8], ['FLOAT', 'double', true], ['DOUBLE', 'double', true], ['NUMERIC', 'string', false], @@ -741,7 +741,7 @@ public function testUuidType(string $columnType, string $phpType) public function provideMappingUuidTypes() { return [ - // column type, php type, + // column type, php type, [PropelTypes::UUID, 'string'], [PropelTypes::UUID_BINARY, 'string'], ];