Skip to content

Commit

Permalink
Merge pull request #88 from MAXakaWIZARD/pr-php-8
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
gonzofy authored May 22, 2020
2 parents 594bb10 + bc5cd31 commit 091b96c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ matrix:
- php: nightly
env: PHP_CS_FIXER_IGNORE_ENV=1
fast_finish: true
allow_failures:
- php: nightly

cache:
directories:
- vendor/
- tools/

before_script:
- if [[ "$TRAVIS_PHP_VERSION" != '8.0' ]]; composer install -o -q --no-suggest ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '8.0' ]]; composer install -o -q --no-suggest --no-dev ; fi
- echo $TRAVIS_PHP_VERSION
- php -v
- PHP_VERSION=$(php -r "echo PHP_VERSION;")
- echo $PHP_VERSION
- composer install -o -q --no-suggest
- if [[ "$PHP_VERSION" == '7.3' ]]; then composer install satooshi/php-coveralls ; fi

script:
- make phpcs
- if [[ "$PHP_VERSION" < '8.0' ]]; then make phpstan ; fi
- mkdir -p build/logs
- if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then make test-coverage ; fi
- if [[ "$TRAVIS_PHP_VERSION" != '7.4' ]]; then make test ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then make test-coverage ; fi
- if [[ "$TRAVIS_PHP_VERSION" != '7.3' ]]; then make test ; fi

after_script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then php vendor/bin/php-coveralls -v ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then php vendor/bin/php-coveralls -v ; fi
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PHPSTAN_LEVEL=5
PHPSTAN_VERSION="0.10.5"
PHPSTAN_VERSION="0.12.25"

tools/php-cs-fixer:
wget --directory-prefix=tools --quiet https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar
Expand All @@ -15,9 +15,11 @@ tools/phpunit:
mv tools/phpunit-7.phar tools/phpunit
chmod +x tools/phpunit

phpcs: tools/php-cs-fixer tools/phpstan
phpcs: tools/php-cs-fixer
composer install --optimize-autoloader --no-dev --no-suggest --quiet
tools/php-cs-fixer fix --dry-run --stop-on-violation -v

phpstan: tools/phpstan
tools/phpstan analyze --level=$(PHPSTAN_LEVEL) --no-progress src/

test: tools/phpunit
Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
"ext-ctype": "*",
"ext-mbstring": "*"
},

"require-dev": {
"ext-json": "*",
"satooshi/php-coveralls": "~2.0"
"ext-json": "*"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 091b96c

Please sign in to comment.