@@ -13,40 +13,50 @@ sudo: false
1313
1414env :
1515 matrix :
16- - DB=mysql db_dsn='mysql://travis@127 .0.0.1/ cakephp_test'
16+ - DB=mysql db_user=root db_host=0 .0.0.0 db_name= cakephp_test
1717
1818 global :
19- - DEFAULT=1
19+ - DEFAULT=1 PREFER_LOWEST="--prefer-lowest"
2020
2121matrix :
2222 fast_finish : true
2323
2424 include :
2525 - php : 7.3
26- env : PHPCS=1 DEFAULT=0
26+ env : PREFER_LOWEST="" DB=mysql db_user=root db_host=0.0.0.0 db_name=cakephp_test
27+
28+ - php : ' 7.4snapshot'
29+ env : PREFER_LOWEST="" DB=mysql db_user=root db_host=0.0.0.0 db_name=cakephp_test
30+
31+ - php : 7.3
32+ env : PHPCS=1 DEFAULT=0 PREFER_LOWEST="
2733
2834 - php : 7.3
29- env : PHPSTAN=1 DEFAULT=0
35+ env : PHPSTAN=1 DEFAULT=0 PREFER_LOWEST="
36+
3037
3138cache :
3239 directories :
3340 - vendor
3441 - $HOME/.composer/cache
3542
3643before_script :
37- - if [[ $TRAVIS_PHP_VERSION != 7.3 ]]; then phpenv config-rm xdebug.ini; fi
44+ - if [[ $TRAVIS_PHP_VERSION != '7.4snapshot' ]]; then phpenv config-rm xdebug.ini; fi
3845
3946 - composer self-update
40- - composer install --prefer-dist --no-interaction
47+ - composer update --prefer-stable --prefer- dist --no-interaction $PREFER_LOWEST
4148
4249 - if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test; GRANT ALL PRIVILEGES ON cakephp_test.* TO travis@localhost;'; fi
4350
4451 - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:"^3.0"; fi
4552 - if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan; fi
4653
54+ # see: https://github.com/cakephp/chronos/issues/106
55+ - if [[ $TRAVIS_PHP_VERSION != 7.0 && $PREFER_LOWEST != "" ]]; then composer require --prefer-stable --prefer-dist --no-interaction $PREFER_LOWEST cakephp/chronos:^1.0.1; fi
56+
4757script :
4858 - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.3 ]]; then vendor/bin/phpunit; fi
49- - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.3 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi
59+ - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.3 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi
5060
5161 - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
5262 - if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -c phpstan.neon -l 7 src; fi
0 commit comments