-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from bearsunday/spike
Fix notice for array (string)
- Loading branch information
Showing
5 changed files
with
69 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,63 @@ | ||
language: php | ||
sudo: false | ||
|
||
php: | ||
- 7 | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
- nightly | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
env: | ||
matrix: | ||
- DEPENDENCIES="" | ||
- DEPENDENCIES="--prefer-lowest --prefer-stable" | ||
before_script: | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then cp $HOME/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini /tmp; fi | ||
- if [[ $TRAVIS_PHP_VERSION != '7.3' ]]; then phpenv config-rm xdebug.ini ; fi | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
before_install: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" | ||
- composer self-update | ||
- composer update $DEPENDENCIES | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then composer require --dev phpstan/phpstan-shim ^0.9 friendsofphp/php-cs-fixer ^2.0 vimeo/psalm ^2.0; fi | ||
|
||
install: | ||
- composer update | ||
|
||
script: | ||
- ./vendor/bin/phpunit $COVERAGE; | ||
- php demo/run.php | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then ./vendor/bin/php-cs-fixer --dry-run -v fix; fi | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then ./vendor/bin/phpstan analyse -l max -c phpstan.neon src tests --no-progress --no-interaction; fi | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then ./vendor/bin/psalm; fi | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then phpenv config-add /tmp/xdebug.ini; ./vendor/bin/phpunit --coverage-clover=coverage.clover; else ./vendor/bin/phpunit; fi | ||
after_script: | ||
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi | ||
- ./vendor/bin/phpunit; | ||
|
||
jobs: | ||
include: | ||
- stage: Test | ||
name: Lowest dependencies | ||
php: 7.2 | ||
install: composer update --prefer-dist --prefer-lowest | ||
|
||
- stage: Test | ||
name: Code coverage | ||
php: 7.2 | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; | ||
|
||
- stage: Code Quality | ||
name: Static analysis | ||
php: 7.2 | ||
install: composer global require --dev phpstan/phpstan-shim ^0.9 vimeo/psalm ^2.0; | ||
script: | ||
- ~/.composer/vendor/bin/phpstan analyse -l max -c phpstan.neon src tests --no-progress --no-interaction; | ||
- ~/.composer/vendor/bin/psalm --show-info=false | ||
|
||
- stage: Code Quality | ||
name: Coding standards | ||
php: 7.2 | ||
install: composer global require --dev friendsofphp/php-cs-fixer ^2.0; | ||
script: | ||
- ~/.composer/vendor/bin/php-cs-fixer --dry-run -v fix; | ||
|
||
allow_failures: | ||
- php: nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters