From e6ba24b47a9770d19efaf558c87b923f998a425c Mon Sep 17 00:00:00 2001 From: Fonata Date: Tue, 20 Mar 2018 11:12:22 +0100 Subject: [PATCH] Dropping PHP 5.4 support (#131) Also removed special treatment of PHP 5.4, as we don't support it anymore --- .travis.yml | 1 - ChangeLog.txt | 2 ++ README.md | 2 +- tests/methods/ParseTest.php | 18 +----------------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index c40e1d8..e3ceefd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ php: - 7.0 - 5.6 - 5.5 - - 5.4 script: - phpunit --version diff --git a/ChangeLog.txt b/ChangeLog.txt index 46bf701..ab36b39 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,8 @@ Date: unreleased - New function getTotalDataRowCount() - useful if $limit is set - see pull request #122. +- Dropped support for PHP 5.4 + ----------------------------------- diff --git a/README.md b/README.md index 3a62600..21a0eb2 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ and third-party support for handling CSV data in PHP. how different programs like Excel for example outputs CSV data. * Support for character encoding conversion using PHP's `iconv()` and `mb_convert_encoding()` functions. -* Supports PHP 5.4 and higher. +* Supports PHP 5.5 and higher. It certainly works with PHP 7.2 and all versions in between. ## Installation diff --git a/tests/methods/ParseTest.php b/tests/methods/ParseTest.php index 443bced..b793a17 100644 --- a/tests/methods/ParseTest.php +++ b/tests/methods/ParseTest.php @@ -108,10 +108,6 @@ class ParseTest extends TestCase { } public function test_Piwik_data() { - if (!function_exists('array_column')) { - // function only available in PHP >= 5.5 - return; - } $this->csv->use_mb_convert_encoding = true; $this->csv->output_encoding = 'UTF-8'; $this->csv->auto(__DIR__ . '/../example_files/Piwik_API_download.csv'); @@ -134,12 +130,6 @@ class ParseTest extends TestCase { * @depends testSepRowAutoDetection */ public function testGetColumnDatatypes() { - if (!function_exists('array_column')) { - // getDatatypes requires array_column, but that - // function is only available in PHP >= 5.5 - return; - } - $this->csv->auto(__DIR__ . '/fixtures/datatype.csv'); $this->csv->getDatatypes(); $expected = [ @@ -157,13 +147,7 @@ class ParseTest extends TestCase { /** * @depends testSepRowAutoDetection */ - public function testAutoDetectFileHasHeading(){ - if (!function_exists('array_column')) { - // getDatatypes requires array_column, but that - // function is only available in PHP >= 5.5 - return; - } - + public function testAutoDetectFileHasHeading() { $this->csv->auto(__DIR__ . '/fixtures/datatype.csv'); $this->assertTrue($this->csv->autoDetectFileHasHeading());