Skip to content

Commit bf797f9

Browse files
author
Gianluca Arbezzano
committed
Merge pull request #44 from gianarb/hotfix/php5.3-travis-conf
Fix failure in php5.3 and upgrade travis conf
2 parents 0a4d86e + 52977f2 commit bf797f9

25 files changed

+18
-761
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
tests/*.expect
2-
tests/*.result
31
tests/.test_fs
42
build/
53
vendor/

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ php:
1111
before_script:
1212
- composer self-update
1313
- composer install
14+
- if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]; then export COMPOSER_PROCESS_TIMEOUT=900; fi
1415

1516
script:
1617
- vendor/bin/phpunit
1718

18-
branches:
19-
only:
20-
- master
21-
- develop
19+
matrix:
20+
fast_finish: true
21+
allow_failures:
22+
- php: 7

PHPCtags.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ private function process($file)
421421
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
422422
);
423423
} catch(Exception $e) {
424-
echo "PHPParser: {$e->getMessage()} - {$filename}".PHP_EOL;
424+
echo "PHPParser: {$e->getMessage()} - {$file}".PHP_EOL;
425425
}
426426
}
427427
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
phpctags
22
========
3-
[![Build Status](https://travis-ci.org/vim-php/phpctags.svg)](https://travis-ci.org/vim-php/phpctags)
3+
Master [![Build Status](https://travis-ci.org/vim-php/phpctags.svg)](https://travis-ci.org/vim-php/phpctags?branch=master)
4+
Develop [![Build Status](https://travis-ci.org/vim-php/phpctags.svg)](https://travis-ci.org/vim-php/phpctags?branch=develop)
45

56
An enhanced php [ctags](http://ctags.sourceforge.net/) index file generator
67
compatible with http://ctags.sourceforge.net/FORMAT.

tests/Acceptance/AcceptanceTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private function getSourceFileLineContent($filename, $line)
259259
{
260260
$filename = $this->testDir . DIRECTORY_SEPARATOR . $filename;
261261
$line--;
262-
263-
return rtrim(file($filename)[$line], PHP_EOL);
262+
$file = file($filename);
263+
return rtrim($file[$line], PHP_EOL);
264264
}
265265
}

tests/Acceptance/TraitsTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ final class TraitsTest extends AcceptanceTestCase
99
*/
1010
public function itCreatesTagForTopLevelTrait()
1111
{
12+
if (version_compare('5.4.0', PHP_VERSION, '>')) {
13+
$this->markTestSkipped('Traits were not introduced until 5.4');
14+
}
15+
1216
$this->givenSourceFile('TopLevelTraitExample.php', <<<'EOS'
1317
<?php
1418
@@ -98,6 +102,10 @@ private function privateMethod()
98102
*/
99103
public function itAddsNamespacesToTraitTags()
100104
{
105+
if (version_compare('5.4.0', PHP_VERSION, '>')) {
106+
$this->markTestSkipped('Traits were not introduced until 5.4');
107+
}
108+
101109
$this->givenSourceFile('MultiLevelNamespace.php', <<<'EOS'
102110
<?php
103111

tests/PHPCtagsTest.php

Lines changed: 0 additions & 85 deletions
This file was deleted.

tests/PHPCtagsTestCase.php

Lines changed: 0 additions & 84 deletions
This file was deleted.

tests/README.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)