From 2b6d8f84576df25b7a63c6434e5057faf74daa34 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 30 Dec 2019 11:13:44 -0500 Subject: [PATCH] updating to use phpunit-bridge and updating travis config --- .travis.yml | 50 +++++++++++++++++++++++++++--------------------- composer.json | 4 ++-- phpunit.xml.dist | 40 +++++++++++++++++++++++--------------- 3 files changed, 55 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d42b26..517928a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,38 @@ language: php - +sudo: false cache: - directories: - - $HOME/.composer/cache + directories: + - $HOME/.composer/cache/files + - $HOME/symfony-bridge/.phpunit -php: - - 7.1 - - 7.2 - - 7.3 +env: + global: + - PHPUNIT_FLAGS="-v" + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" + - SYMFONY_REQUIRE='>=2.8' matrix: - include: - - php: 7.3 - env: SYMFONY_VERSION="5.0.*@dev" - - php: 7.1 - env: SYMFONY_VERSION="4.3.*@dev" - - php: 7.3 - env: SYMFONY_VERSION="3.4.*@dev" - - php: 7.2 - env: DEPENDENCIES=beta - fast_finish: true + fast_finish: true + include: + - php: 7.1 + - php: 7.2 + - php: 7.3 + env: deps=low before_install: - - if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi; - - if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; - - if [[ "$SYMFONY_VERSION" != "" ]]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi + - phpenv config-rm xdebug.ini || true + - composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master -install: composer update --prefer-dist +install: + - | + if [[ $deps = low ]]; then + export SYMFONY_DEPRECATIONS_HELPER=weak + composer update --prefer-dist --prefer-lowest --prefer-stable + else + composer update --prefer-dist + fi + - ./vendor/bin/simple-phpunit install script: - - vendor/bin/phpunit + - composer validate --strict --no-check-lock + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS diff --git a/composer.json b/composer.json index 1a93be9..2a5a37a 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "homepage": "http://github.com/KnpLabs/KnpSnappyBundle/contributors" } ], - + "minimum-stability": "dev", "require": { "php": ">=7.1", "symfony/framework-bundle": "^3.4|^4.3|^5.0", @@ -35,9 +35,9 @@ }, "require-dev": { "doctrine/annotations": "~1.0", - "phpunit/phpunit": "~7.4", "symfony/asset": "^3.4|^4.3|^5.0", "symfony/finder": "^3.4|^4.3|^5.0", + "symfony/phpunit-bridge": "^4.3|^5.0", "symfony/security-csrf": "^3.4|^4.3|^5.0", "symfony/templating": "^3.4|^4.3|^5.0", "symfony/validator": "^3.4|^4.3|^5.0", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ceb1369..4f8c9ee 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,21 +1,31 @@ - - - + + + + + - - ./Tests + + tests - + + + + . + + tests + vendor + + + + \ No newline at end of file