Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ enabled:
- strict
- php_unit_construct

disabled: [single_line_class_definition]
disabled:
- single_line_class_definition
- single_line_throw
38 changes: 15 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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. #
Expand All @@ -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"
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -42,7 +42,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "2.2-dev"
}
}
}
6 changes: 3 additions & 3 deletions tests/Unit/Routing/DynamicRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
;
Expand All @@ -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))
;
Expand Down Expand Up @@ -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))
;
Expand Down