From d5690af227e2848ba86c573e6bb7c5080daaea00 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 18 May 2017 16:45:17 +0200 Subject: [PATCH 1/3] test against different dependency versions * by default, run with latest stable versions * add a job with lowest stable constrained deps * run with upcoming releases of required deps --- .travis.yml | 9 ++++++++- composer.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 91a4cefd..eff6affe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,15 @@ php: - 7.1 - hhvm +env: + - COMPOSER_OPTIONS="--prefer-stable" + matrix: include: + - php: 7.0 + env: COMPOSER_OPTIONS="--prefer-lowest --prefer-stable" + - php: 7.0 + env: COMPOSER_OPTIONS="" - php: 7.1 env: TEST_COVERAGE=true allow_failures: @@ -26,7 +33,7 @@ before_install: - composer self-update - if [[ $TEST_COVERAGE ]]; then PHPUNIT_FLAGS="--coverage-clover clover.xml"; fi -install: travis_retry composer install --no-interaction --prefer-dist +install: travis_retry composer update --no-interaction --prefer-dist $COMPOSER_OPTIONS script: - vendor/bin/phpunit -v $PHPUNIT_FLAGS diff --git a/composer.json b/composer.json index 8f95e787..bcf8cda3 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "friendsofphp/php-cs-fixer": "^1.8.0", "phpunit/phpunit": "^4.6.6" }, + "minimum-stability": "dev", "autoload": { "psr-0" : { "Sentry\\SentryBundle\\": "src/" From c23fa8965646b5d16ea5b189c99984a4821afa8e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 18 May 2017 17:00:39 +0200 Subject: [PATCH 2/3] be explicit about required dependencies Depending on the FrameworkBundle implicitly pulling into all the required packages is fragile and likely to break. --- .travis.yml | 2 -- composer.json | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index eff6affe..28784cb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,6 @@ matrix: include: - php: 7.0 env: COMPOSER_OPTIONS="--prefer-lowest --prefer-stable" - - php: 7.0 - env: COMPOSER_OPTIONS="" - php: 7.1 env: TEST_COVERAGE=true allow_failures: diff --git a/composer.json b/composer.json index bcf8cda3..561e0ce7 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,17 @@ "require": { "php": ">=5.3.3", "sentry/sentry": ">=1.5.0", - "symfony/framework-bundle": ">=2.4.0" + "symfony/config": "^2.4|^3.0", + "symfony/console": "^2.4|^3.0", + "symfony/dependency-injection": "^2.4|^3.0", + "symfony/event-dispatcher": "^2.4|^3.0", + "symfony/http-kernel": "^2.4|^3.0", + "symfony/security-core": "^2.4|^3.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^1.8.0", "phpunit/phpunit": "^4.6.6" }, - "minimum-stability": "dev", "autoload": { "psr-0" : { "Sentry\\SentryBundle\\": "src/" From 21358fbac78150ec5a1070d18a19d8a2e3496acf Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Fri, 19 May 2017 11:35:48 +0200 Subject: [PATCH 3/3] Always --prefer-stable on Travis --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28784cb3..e77adc6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,13 +10,12 @@ php: - 7.1 - hhvm -env: - - COMPOSER_OPTIONS="--prefer-stable" - matrix: include: + - php: 5.3 + env: COMPOSER_OPTIONS="--prefer-lowest" - php: 7.0 - env: COMPOSER_OPTIONS="--prefer-lowest --prefer-stable" + env: COMPOSER_OPTIONS="--prefer-lowest" - php: 7.1 env: TEST_COVERAGE=true allow_failures: @@ -31,7 +30,7 @@ before_install: - composer self-update - if [[ $TEST_COVERAGE ]]; then PHPUNIT_FLAGS="--coverage-clover clover.xml"; fi -install: travis_retry composer update --no-interaction --prefer-dist $COMPOSER_OPTIONS +install: travis_retry composer update --no-interaction --prefer-dist --prefer-stable $COMPOSER_OPTIONS script: - vendor/bin/phpunit -v $PHPUNIT_FLAGS