From ea99006dbca278059af2958c4c46990d71a8b83e Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 27 Aug 2015 15:51:03 +0200 Subject: [PATCH 1/2] Improve the Travis configuration - use the faster container-based infrastructure - persist the composer download cache between builds as it is available in the new infrastructure - test against more PHP versions than just PHP 5.3 - test against unmodified requirements to be sure they are enough to run the tests - test against lowest dependencies to ensure lowest bounds are valid - test against the Symfony LTS versions to ensure their support --- .travis.yml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 107a046..c36215d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,33 @@ language: php +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + php: - 5.3 + - 5.4 + # 5.5 and 5.6 are already covered by the jobs running against specific Symfony versions. no need to duplicate them here + - 7.0 + - hhvm + +matrix: + include: + # force testing against Symfony LTS versions + - php: 5.5 + env: SYMFONY_VERSION=2.3.* + - php: 5.6 + env: SYMFONY_VERSION=2.7.* + # Test against lowest dependencies + - php: 5.6 + env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' -env: - - SYMFONY_VERSION=2.3.* - - SYMFONY_VERSION=2.4.* - - SYMFONY_VERSION=2.5.* +before_install: + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi -before_script: - - composer self-update - - composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update - - composer install --dev --prefer-source +install: + - composer update $COMPOSER_FLAGS script: phpunit --coverage-text From ecff6b98c71e9f8405f17a5d4a4c4e6fcfea2199 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 27 Aug 2015 15:59:14 +0200 Subject: [PATCH 2/2] Add the Symfony PHPUnit bridge to detect deprecated API usage --- composer.json | 3 ++- tests/DependencyInjection/KeenIOExtensionTest.php | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 3dd8269..8c3d04d 100755 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "symfony/framework-bundle": "~2.3" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "symfony/phpunit-bridge": "~2.7", + "phpunit/phpunit": "~4.5" }, "autoload": { "psr-4": { diff --git a/tests/DependencyInjection/KeenIOExtensionTest.php b/tests/DependencyInjection/KeenIOExtensionTest.php index 97481bc..16dbf33 100644 --- a/tests/DependencyInjection/KeenIOExtensionTest.php +++ b/tests/DependencyInjection/KeenIOExtensionTest.php @@ -6,13 +6,10 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; class KeenIOExtensionTest extends \PHPUnit_Framework_TestCase { /** - * QPush Extension - * * @var KeenIOExtension */ private $extension;