Skip to content

Commit 245a809

Browse files
Drop PHP 5.3 support
Add PHP 7.2 support Enrich CI test matrix with lowest, latest and beta dependencies Add to composer linter, test and code style commands
1 parent 02259e3 commit 245a809

File tree

4 files changed

+49
-1503
lines changed

4 files changed

+49
-1503
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
composer.lock
12
phpunit.xml
23
tests/log
34
vendor

.travis.yml

+26-16
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
language: php
22

3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- 7.1
9+
- 7.2
10+
- nightly
11+
312
env:
4-
global:
5-
- DEPENDENCIES=no
13+
- DEPENDENCIES=no
14+
- DEPENDENCIES=beta
15+
- DEPENDENCIES=low
616

717
matrix:
8-
include:
9-
- php: 5.3
10-
dist: precise
11-
- php: 5.4
12-
dist: precise
13-
- php: 5.6
14-
- php: 7.0
15-
- php: 7.1
16-
- php: nightly
1718
allow_failures:
18-
- php: 7.2
1919
- php: nightly
20+
- env: DEPENDENCIES=beta
21+
- env: DEPENDENCIES=low
2022

2123
script:
2224
- mkdir -p build/logs
23-
- php vendor/bin/phpunit -c phpunit.xml.dist
24-
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
25-
- ./vendor/bin/phpcs --standard=PSR2 ./lib/
25+
- composer validate-files
26+
- composer check-code-style
27+
- composer run-tests
2628

2729
before_script:
28-
- composer install --prefer-source
30+
- if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-stable update; else composer update; fi;
2931

3032
after_script:
3133
- php vendor/bin/coveralls -v
@@ -36,3 +38,11 @@ before_install:
3638
- tar -zxvf Image-ExifTool-9.90.tar.gz
3739
- cd Image-ExifTool-9.90 && perl Makefile.PL && make test && sudo make install
3840
- cd .. && rm -rf Image-ExifTool-9.90
41+
# Set composer minimum-stability configuration filter to beta versions
42+
- if [ "$DEPENDENCIES" = "beta" ]; then perl -pi -e 's/^}$/,"minimum-stability":"beta"}/' composer.json; fi;
43+
# Disable xdebug, there is no use of it being enabled
44+
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
45+
# Prevent Travis throwing an out of memory error
46+
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
47+
# Test if we have a token for github in case the project hits the 60 rph limit
48+
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;

composer.json

+22-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
],
1313
"keywords": ["EXIF", "IPTC", "jpeg", "tiff", "exiftool"],
1414
"require": {
15-
"php": ">=5.3.0"
15+
"php": ">=5.4"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "3.7.*",
19-
"satooshi/php-coveralls": "~0.6",
18+
"jakub-onderka/php-parallel-lint": "^1.0",
2019
"phpmd/phpmd": "~2.2",
20+
"phpunit/phpunit": ">=4.0 <6.0",
21+
"satooshi/php-coveralls": "~0.6",
2122
"sebastian/phpcpd": "1.4.*@stable",
2223
"squizlabs/php_codesniffer": "1.4.*@stable"
2324
},
@@ -29,5 +30,21 @@
2930
"psr-0": {
3031
"PHPExif": "lib/"
3132
}
32-
}
33-
}
33+
},
34+
"scripts": {
35+
"check-code-style": [
36+
"vendor/bin/phpcs --standard=PSR2 ./lib/"
37+
],
38+
"run-tests": [
39+
"vendor/bin/phpunit -c phpunit.xml.dist",
40+
"vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml"
41+
],
42+
"validate-files": [
43+
"vendor/bin/parallel-lint --exclude vendor ."
44+
]
45+
},
46+
"config": {
47+
"sort-packages": true
48+
},
49+
"prefer-stable": true
50+
}

0 commit comments

Comments
 (0)