From 0b2d1c2af5dc5c385ce4c89ffc48d9a53be62ae0 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Mon, 28 Oct 2019 10:45:16 +0100 Subject: [PATCH] allow Symfony 5 --- .travis.yml | 23 +++++++++++++++-------- CHANGELOG.md | 6 ++++++ composer.json | 14 +++++++------- makefile | 4 ++-- tests/phpunit.xml | 8 ++++++-- tests/{phpunit8.xml => phpunit7.xml} | 8 ++------ 6 files changed, 38 insertions(+), 25 deletions(-) rename tests/{phpunit8.xml => phpunit7.xml} (82%) diff --git a/.travis.yml b/.travis.yml index 8f007b5..720b8dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ php: - 7.3 env: - - SYMFONY_VERSION="3.4.*" - - SYMFONY_VERSION="4.3.*" + - SYMFONY_REQUIRE="3.4.*" + - SYMFONY_REQUIRE="4.3.*" - PHPUNIT_VERSION="8.*" matrix: @@ -23,21 +23,28 @@ matrix: - php: 7.3 env: - PHPUNIT_VERSION="7.*" - - SYMFONY_VERSION="3.4.*" + - SYMFONY_REQUIRE="3.4.*" + - php: 7.3 + env: + - STABILITY=dev + - SYMFONY_REQUIRE="5.0.*" + +before_install: + - phpenv config-rm xdebug.ini || echo "xDebug not disabled" + - composer global require --no-progress --no-scripts --no-plugins symfony/flex install: - rm -rf composer.lock vendor/* - - phpenv config-rm xdebug.ini || echo "xDebug not disabled" - - export COMPOSER_MEMORY_LIMIT=-1 && composer require symfony/symfony:${SYMFONY_VERSION:-"4.3.*"} phpunit/phpunit:${PHPUNIT_VERSION:-"8.*"} + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; + - composer require phpunit/phpunit:${PHPUNIT_VERSION:-"8.*"} --update-with-all-dependencies script: - cp tests/Functional/parameters.yml.dist tests/Functional/parameters.yml - rm -rf tests/Functional/cache - make phpstan php_cs_fixer_check - | - if [[ ${PHPUNIT_VERSION} != "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/ --coverage-clover ./build/logs/clover.xml; - elif [[ ${PHPUNIT_VERSION} == "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/phpunit8.xml --coverage-clover ./build/logs/clover.xml; - elif [[ ${PHPUNIT_VERSION} == "8.*" ]]; then vendor/bin/phpunit -c tests/phpunit8.xml tests/; + if [[ ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/ --coverage-clover ./build/logs/clover.xml; + elif [[ ${PHPUNIT_VERSION} == "7.*" ]]; then vendor/bin/phpunit -c tests/phpunit7.xml tests/; else vendor/bin/phpunit -c tests/ tests/; fi diff --git a/CHANGELOG.md b/CHANGELOG.md index b363945..c79abc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [6.2.0] +### Changed +- drop support for unmaintained Symfony versions +- allow Symfony 5 +- allow DoctrineBundle 2 + ## [6.1.0] ### Changed - add typehints diff --git a/composer.json b/composer.json index e0f2ed1..99b7c3e 100644 --- a/composer.json +++ b/composer.json @@ -12,14 +12,14 @@ ], "require": { "php": "^7.2", - "symfony/framework-bundle": "~3.0|~4.0", - "doctrine/dbal": "~2.9", - "doctrine/doctrine-bundle": "~1.11" + "symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0", + "doctrine/dbal": "^2.9", + "doctrine/doctrine-bundle": "^1.11 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "~7.0|~8.0", - "symfony/yaml": "~3.0|~4.0", - "symfony/phpunit-bridge": "~4.3" + "phpunit/phpunit": "^7.0 || ^8.0", + "symfony/yaml": "^3.4 || ^4.3 || ^5.0", + "symfony/phpunit-bridge": "^4.3 || ^5.0" }, "autoload": { "psr-4": { @@ -31,7 +31,7 @@ }, "extra": { "branch-alias": { - "dev-master": "6.1.x-dev" + "dev-master": "7.0.x-dev" } } } diff --git a/makefile b/makefile index de21315..689ff67 100644 --- a/makefile +++ b/makefile @@ -8,8 +8,8 @@ tests/Functional/parameters.yml: test: tests/Functional/parameters.yml vendor/bin/phpunit -c tests/ tests/ -test_phpunit_8: tests/Functional/parameters.yml - vendor/bin/phpunit -c tests/phpunit8.xml tests/ +test_phpunit_7: tests/Functional/parameters.yml + vendor/bin/phpunit -c tests/phpunit7.xml tests/ phpstan: phpstan.phar ./phpstan.phar analyse -c phpstan.neon -a vendor/autoload.php -l 7 src diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 9dd0754..89f965d 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,6 +1,6 @@ + + + + ../tests @@ -29,6 +33,6 @@ - + diff --git a/tests/phpunit8.xml b/tests/phpunit7.xml similarity index 82% rename from tests/phpunit8.xml rename to tests/phpunit7.xml index 89f965d..9dd0754 100644 --- a/tests/phpunit8.xml +++ b/tests/phpunit7.xml @@ -1,6 +1,6 @@ - - - - ../tests @@ -33,6 +29,6 @@ + -