diff --git a/.styleci.yml b/.styleci.yml index 2bdb04b1..22759ee1 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -26,4 +26,6 @@ enabled: - strict - php_unit_construct -disabled: [single_line_class_definition] +disabled: + - single_line_class_definition + - single_line_throw diff --git a/.travis.yml b/.travis.yml index d718aee6..1b859d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ ############################################################################ # This file is part of the Symfony CMF package. # # # -# (c) 2011-2017 Symfony CMF # +# (c) Symfony CMF # # # # For the full copyright and license information, please view the LICENSE # # file that was distributed with this source code. # @@ -17,50 +17,42 @@ language: php php: - 7.1 + - 7.2 + - 7.3 sudo: false cache: directories: - .phpunit - - $HOME/.composer/cache/files + - $HOME/.composer/cache env: matrix: SYMFONY_VERSION=4.0.* global: - - SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" - - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - SYMFONY_PHPUNIT_VERSION=6 - - TEST_INSTALLATION=false + - COMPOSER_MEMORY_LIMIT=-1 + - SYMFONY_DEPRECATIONS_HELPER="max[self]=0" matrix: include: - - php: 7.2 - env: SYMFONY_VERSION=4.2.* - - php: 7.2 - env: SYMFONY_VERSION=4.1.* - - php: 7.2 - env: SYMFONY_VERSION=4.0.* - php: 7.1 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.2 - env: SYMFONY_VERSION=3.3.* - - php: 7.2 - env: SYMFONY_VERSION=3.4.* + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_REQUIRE=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak + - php: 7.4 + env: SYMFONY_REQUIRE=4.3.* + - php: 7.4 + env: SYMFONY_REQUIRE=4.4.* fast_finish: true allow_failures: before_install: - phpenv config-rm xdebug.ini || true - - composer self-update - - composer validate --no-check-all --ansi - - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi; - - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi - - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) + - composer global require --no-progress --no-scripts --no-plugins symfony/flex -install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS +install: travis_wait composer update -n --prefer-stable --prefer-dist $COMPOSER_FLAGS script: - - if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi + - composer validate --no-check-all --ansi + - make test notifications: irc: "irc.freenode.org#symfony-cmf" diff --git a/composer.json b/composer.json index c3fc10ca..dc5540c3 100644 --- a/composer.json +++ b/composer.json @@ -16,19 +16,19 @@ ], "require": { "php": "^7.1", - "symfony/routing": "^2.8 || ^3.3 || ^4.0", - "symfony/http-kernel": "^2.8 || ^3.3 || ^4.0", + "symfony/routing": "^3.4 || ^4.3", + "symfony/http-kernel": "^3.4 || ^4.3", "psr/log": "^1.0" }, "require-dev": { "symfony/phpunit-bridge": "^4.2.2", - "symfony/dependency-injection": "^2.8 || ^3.3 || ^4.0", - "symfony/config": "^2.8 || ^3.3 || ^4.0", - "symfony/event-dispatcher": "^2.8 || ^3.3 || ^4.0", + "symfony/dependency-injection": "^3.4 || ^4.3", + "symfony/config": "^3.4 || ^4.3", + "symfony/event-dispatcher": "^3.4 || ^4.3", "symfony-cmf/testing": "^2.1.0" }, "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" + "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (^3.4 || ^4.3)" }, "autoload": { "psr-4": { @@ -42,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/tests/Unit/Routing/DynamicRouterTest.php b/tests/Unit/Routing/DynamicRouterTest.php index 92ab9fee..828d1368 100644 --- a/tests/Unit/Routing/DynamicRouterTest.php +++ b/tests/Unit/Routing/DynamicRouterTest.php @@ -190,7 +190,7 @@ public function testMatchUrl() $this->enhancer->expects($this->once()) ->method('enhance') ->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) { - return DynamicRouterTest::URL === $request->server->get('REQUEST_URI'); + return self::URL === $request->server->get('REQUEST_URI'); })) ->will($this->returnValue($expected)) ; @@ -215,7 +215,7 @@ public function testMatchRequestWithUrlMatcher() $this->enhancer->expects($this->once()) ->method('enhance') ->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) { - return DynamicRouterTest::URL === $request->server->get('REQUEST_URI'); + return self::URL === $request->server->get('REQUEST_URI'); })) ->will($this->returnValue($expected)) ; @@ -243,7 +243,7 @@ public function testMatchRequest() $this->enhancer->expects($this->once()) ->method('enhance') ->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) { - return DynamicRouterTest::URL === $request->server->get('REQUEST_URI'); + return self::URL === $request->server->get('REQUEST_URI'); })) ->will($this->returnValue($expected)) ;