From 93cc32bd132af225bb5d7ae19acb8a35ffeedb56 Mon Sep 17 00:00:00 2001 From: Evaldo Bento Date: Thu, 2 Jul 2020 08:11:12 +0200 Subject: [PATCH] Updated php minimum version to 7.0. Updated PHPUnit to 6.0. Removed php 5.x support. --- .travis.yml | 3 --- README.md | 2 +- buildPHAR.php | 18 ------------------ composer.json | 6 +++--- tests/Acceptance/AcceptanceTestCase.php | 4 ++-- 5 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b14df4..95c1587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.6 - 7 - hhvm @@ -15,5 +14,3 @@ script: matrix: fast_finish: true - allow_failures: - - php: 7 diff --git a/README.md b/README.md index 2f200d1..bc19b2c 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ for more details. Requirements ------------ -* PHP CLI 5.3+ +* PHP CLI 7.0+ * [PHP-Parser](https://github.com/nikic/PHP-Parser) Acknowledgements diff --git a/buildPHAR.php b/buildPHAR.php index 37e5764..6a108cc 100644 --- a/buildPHAR.php +++ b/buildPHAR.php @@ -2,24 +2,6 @@ $phar = new Phar('build/phpctags.phar', 0, 'phpctags.phar'); -if (version_compare(PHP_VERSION, '5.4.0') < 0) { - class RecursiveCallbackFilterIterator extends RecursiveFilterIterator { - public function __construct ( RecursiveIterator $iterator, $callback ) { - $this->callback = $callback; - parent::__construct($iterator); - } - - public function accept () { - $callback = $this->callback; - return $callback(parent::current(), parent::key(), parent::getInnerIterator()); - } - - public function getChildren () { - return new self($this->getInnerIterator()->getChildren(), $this->callback); - } - } -} - $phar->buildFromIterator( new RecursiveIteratorIterator( new RecursiveCallbackFilterIterator( diff --git a/composer.json b/composer.json index 80dcfbd..68a0017 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,11 @@ "keywords": ["ctags"], "type": "library", "require": { - "php": ">=5.3", - "nikic/php-parser": "^4.0" + "php": ">=7.0", + "nikic/php-parser": "^4.5" }, "require-dev": { - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^6.5" }, "autoload": { "classmap": ["PHPCtags.class.php"] diff --git a/tests/Acceptance/AcceptanceTestCase.php b/tests/Acceptance/AcceptanceTestCase.php index ddb7452..27b767c 100644 --- a/tests/Acceptance/AcceptanceTestCase.php +++ b/tests/Acceptance/AcceptanceTestCase.php @@ -3,11 +3,11 @@ namespace tests\PHPCTags\Acceptance; use Exception; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; -abstract class AcceptanceTestCase extends PHPUnit_Framework_TestCase +abstract class AcceptanceTestCase extends TestCase { const FORMAT = "\t\t/^$/;\"\t\tline:\t\t";