Skip to content

Commit a5b77b3

Browse files
committed
Merge pull request #86 from Majkl578/php56/remove-compat-checks
Remove PHP <=5.6 compatibility checks
2 parents a3749ca + cbc3fab commit a5b77b3

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

tests/Database/ResultSet.normalizeRow.mysql.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Assert::equal([
1919
'unsigned_int' => 1,
2020
'int' => 1,
2121
'smallint' => 1,
22-
'tinyint' => PHP_VERSION_ID < 50417 ? '1' : 1, // PHP bug #48724
22+
'tinyint' => 1,
2323
'mediumint' => 1,
2424
'bigint' => 1,
2525
'bit' => '1',
@@ -31,7 +31,7 @@ Assert::equal([
3131
'time' => new DateInterval('PT30H10M10S'),
3232
'datetime' => new DateTime('2012-10-13 10:10:10'),
3333
'timestamp' => new DateTime('2012-10-13 10:10:10'),
34-
'year' => PHP_VERSION_ID < 50417 ? '2012' : 2012, // PHP bug #48724
34+
'year' => 2012,
3535
'char' => 'a',
3636
'varchar' => 'a',
3737
'binary' => 'a',
@@ -52,7 +52,7 @@ Assert::equal([
5252
'unsigned_int' => 0,
5353
'int' => 0,
5454
'smallint' => 0,
55-
'tinyint' => PHP_VERSION_ID < 50417 ? '0' : 0, // PHP bug #48724
55+
'tinyint' => 0,
5656
'mediumint' => 0,
5757
'bigint' => 0,
5858
'bit' => '0',
@@ -64,7 +64,7 @@ Assert::equal([
6464
'time' => new DateInterval('P0D'),
6565
'datetime' => new DateTime('0000-00-00 00:00:00'),
6666
'timestamp' => new DateTime('0000-00-00 00:00:00'),
67-
'year' => PHP_VERSION_ID < 50417 ? '2000' : 2000, // PHP bug #48724
67+
'year' => 2000,
6868
'char' => '',
6969
'varchar' => '',
7070
'binary' => "\x00",

tests/Database/SqlPreprocessor.phpt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,11 @@ test(function () use ($preprocessor, $driverName) { // date time
254254

255255

256256
Assert::same([], $params);
257-
if (PHP_VERSION_ID >= 50500) {
258-
list($sql, $params) = $preprocessor->process(['SELECT ?', [new DateTimeImmutable('2011-11-11')]]);
259-
Assert::same(reformat([
260-
'sqlite' => 'SELECT 1320966000',
261-
"SELECT '2011-11-11 00:00:00'",
262-
]), $sql);
263-
}
257+
list($sql, $params) = $preprocessor->process(['SELECT ?', [new DateTimeImmutable('2011-11-11')]]);
258+
Assert::same(reformat([
259+
'sqlite' => 'SELECT 1320966000',
260+
"SELECT '2011-11-11 00:00:00'",
261+
]), $sql);
264262
});
265263

266264

0 commit comments

Comments
 (0)