diff --git a/.travis.yml b/.travis.yml index 24c2d6c..ddfd84f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,15 +4,42 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 env: - matrix: - - COMPOSER_FLAGS="--prefer-lowest" - - COMPOSER_FLAGS="" + - LARAVEL="^5.5" COMPOSER_FLAGS="--prefer-lowest" + - LARAVEL="^5.5" COMPOSER_FLAGS="" + - LARAVEL="^6.0" COMPOSER_FLAGS="--prefer-lowest" + - LARAVEL="^6.0" COMPOSER_FLAGS="" + - LARAVEL="^7.0" COMPOSER_FLAGS="--prefer-lowest" + - LARAVEL="^7.0" COMPOSER_FLAGS="" -before_script: - - travis_retry composer self-update - - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source +matrix: + exclude: + - php: 7.1 + env: LARAVEL="^6.0" COMPOSER_FLAGS="--prefer-lowest" + - php: 7.1 + env: LARAVEL="^6.0" COMPOSER_FLAGS="" + - php: 7.1 + env: LARAVEL="^7.0" COMPOSER_FLAGS="--prefer-lowest" + - php: 7.1 + env: LARAVEL="^7.0" COMPOSER_FLAGS="" + allow_failures: + - php: 7.4 + env: LARAVEL="^5.5" COMPOSER_FLAGS="--prefer-lowest" + - php: 7.4 + env: LARAVEL="^6.0" COMPOSER_FLAGS="--prefer-lowest" + +cache: + directories: + - $HOME/.composer/cache/files + +before_install: + - echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + +install: + - travis_retry composer require laravel/framework:${LARAVEL} --no-interaction --prefer-dist + - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover diff --git a/composer.json b/composer.json index a68a093..9db0a09 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ ], "require": { "php": "^7.1", - "illuminate/support": "^5.5|^6" + "illuminate/support": "^5.5 || ^6.0 || ^7.0" }, "require-dev": { - "orchestra/testbench": "3.6.*", - "phpunit/phpunit": "^7.0" + "orchestra/testbench": "^3.0 || ^4.0 || ^5.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 6f669c4..b981a0a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,7 +12,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase { protected static $setUpRun = false; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -79,4 +79,4 @@ protected function setUpDatabase() $table->morphs('commentable'); }); } -} \ No newline at end of file +}