Skip to content

Commit f02a7cb

Browse files
andreybolonindunglas
authored andcommitted
Support for PHP 7.3
* Update .travis.yml * Update deps * Try to fix Travis * Fix CS * Fix Box and disable PhpScoper
1 parent 408b291 commit f02a7cb

13 files changed

+1080
-542
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/build/
33
/vendor/
44
/*.phar
5+
/.phpunit.result.cache

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ matrix:
88
include:
99
- php: '7.1'
1010
- php: '7.2'
11+
- php: '7.3'
1112
env: coverage=1 lint=1
12-
- php: '7.2'
13+
- php: '7.3'
1314
env: deps='low'
1415

1516
before_install:
@@ -18,22 +19,23 @@ before_install:
1819
- export PATH="$PATH:$HOME/.composer/vendor/bin"
1920
- wget -O phpunit.phar https://phar.phpunit.de/phpunit-7.5.phar
2021
- if [[ $coverage = 1 ]]; then mkdir -p build/logs; fi
21-
- if [[ $coverage = 1 ]]; then wget https://github.com/satooshi/php-coveralls/releases/download/v2.0.0/php-coveralls.phar; fi
22-
- if [[ $lint = 1 ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.10.0/php-cs-fixer.phar; fi
23-
- if [[ $lint = 1 ]]; then composer global require --dev 'phpstan/phpstan:^0.10'; fi
24-
- wget -O box.phar https://github.com/humbug/box/releases/download/3.2.0/box.phar
22+
- if [[ $coverage = 1 ]]; then wget https://github.com/satooshi/php-coveralls/releases/download/v2.1.0/php-coveralls.phar; fi
23+
- if [[ $lint = 1 ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.0/php-cs-fixer.phar; fi
24+
- if [[ $lint = 1 ]]; then composer global require --dev 'phpstan/phpstan:^0.11'; fi
25+
- wget -O box.phar https://github.com/humbug/box/releases/download/3.8.3/box.phar
2526
- export BOX_BIN=$(pwd)/box.phar
2627

2728
install:
2829
- if [[ $coverage = 1 ]]; then composer require --dev --no-update 'phpunit/php-code-coverage:^5.3'; fi
29-
- if [[ ! $deps ]]; then composer install --prefer-dist --no-progress --no-suggest --ansi; fi
30+
- if [[ ! $deps && $TRAVIS_PHP_VERSION = "7.3" ]]; then composer install --prefer-dist --no-progress --no-suggest --ansi; fi
31+
- if [[ $TRAVIS_PHP_VERSION != "7.3" ]]; then composer update --prefer-dist --no-progress --no-suggest --ansi; fi
3032
- if [[ $deps = 'low' ]]; then composer update --prefer-dist --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi; fi
3133

3234
script:
3335
- if [[ $coverage = 1 ]]; then phpdbg -qrr phpunit.phar --coverage-clover build/logs/clover.xml; else php phpunit.phar; fi
3436
- if [[ $lint = 1 ]]; then php php-cs-fixer.phar fix --dry-run --diff --no-ansi; fi
3537
- if [[ $lint = 1 ]]; then phpstan analyse -l5 --ansi src; fi
36-
- if [[ ! $deps && $TRAVIS_PHP_VERSION = "7.2" ]]; then ./bin/compile; fi
38+
- if [[ ! $deps && $TRAVIS_PHP_VERSION = "7.3" ]]; then ./bin/compile; fi
3739

3840
after_success:
3941
- if [[ $coverage = 1 ]]; then travis_retry php php-coveralls.phar; fi
@@ -47,5 +49,5 @@ deploy:
4749
on:
4850
tags: true
4951
repo: api-platform/schema-generator
50-
php: '7.2'
52+
php: '7.3'
5153
condition: "! $deps"

bin/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -eox pipefail
44

5-
php $BOX_BIN compile;
5+
php "$BOX_BIN" compile;
66

77
php schema.phar generate-types tmp/ tests/e2e/schema.yml;
88

box.json.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"files": [
1616
"vendor/friendsofphp/php-cs-fixer/tests/TestCase.php",
17-
"vendor/twig/twig/lib/Twig/Test.php"
17+
"vendor/twig/twig/src/TwigTest.php"
1818
],
1919
"directories": [
2020
"vendor/friendsofphp/php-cs-fixer/tests/Test"
@@ -24,8 +24,7 @@
2424
"compression": "GZ",
2525
"compactors": [
2626
"KevinGH\\Box\\Compactor\\Json",
27-
"KevinGH\\Box\\Compactor\\Php",
28-
"KevinGH\\Box\\Compactor\\PhpScoper"
27+
"KevinGH\\Box\\Compactor\\Php"
2928
],
3029

3130
"git-version": "package_version",

0 commit comments

Comments
 (0)