Skip to content

Commit

Permalink
Updated php minimum version to 7.0.
Browse files Browse the repository at this point in the history
Updated PHPUnit to 6.0.
Removed php 5.x support.
  • Loading branch information
InFog committed Jul 2, 2020
1 parent 134dc0f commit 93cc32b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.6
- 7
- hhvm

Expand All @@ -15,5 +14,3 @@ script:

matrix:
fast_finish: true
allow_failures:
- php: 7
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions buildPHAR.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions tests/Acceptance/AcceptanceTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<name>\t<file>\t/^<line content>$/;\"\t<short kind>\tline:<line number>\t<scope>\t<access>";

Expand Down

0 comments on commit 93cc32b

Please sign in to comment.