Skip to content

Commit 21c668b

Browse files
committed
fix travis-ci build
1 parent c37797d commit 21c668b

File tree

4 files changed

+28
-34
lines changed

4 files changed

+28
-34
lines changed

.styleci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ enabled:
2626
- strict
2727
- php_unit_construct
2828

29-
disabled: [single_line_class_definition]
29+
disabled:
30+
- single_line_class_definition
31+
- single_line_throw

.travis.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################################
88
# This file is part of the Symfony CMF package. #
99
# #
10-
# (c) 2011-2017 Symfony CMF #
10+
# (c) Symfony CMF #
1111
# #
1212
# For the full copyright and license information, please view the LICENSE #
1313
# file that was distributed with this source code. #
@@ -17,50 +17,42 @@ language: php
1717

1818
php:
1919
- 7.1
20+
- 7.2
21+
- 7.3
2022

2123
sudo: false
2224

2325
cache:
2426
directories:
2527
- .phpunit
26-
- $HOME/.composer/cache/files
28+
- $HOME/.composer/cache
2729

2830
env:
2931
matrix: SYMFONY_VERSION=4.0.*
3032
global:
31-
- SYMFONY_DEPRECATIONS_HELPER="/.*each.*/"
32-
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
3333
- SYMFONY_PHPUNIT_VERSION=6
34-
- TEST_INSTALLATION=false
34+
- COMPOSER_MEMORY_LIMIT=-1
35+
- SYMFONY_DEPRECATIONS_HELPER="max[self]=0"
3536

3637
matrix:
3738
include:
38-
- php: 7.2
39-
env: SYMFONY_VERSION=4.2.*
40-
- php: 7.2
41-
env: SYMFONY_VERSION=4.1.*
42-
- php: 7.2
43-
env: SYMFONY_VERSION=4.0.*
4439
- php: 7.1
45-
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
46-
- php: 7.2
47-
env: SYMFONY_VERSION=3.3.*
48-
- php: 7.2
49-
env: SYMFONY_VERSION=3.4.*
40+
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_REQUIRE=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak
41+
- php: 7.4
42+
env: SYMFONY_REQUIRE=4.3.*
43+
- php: 7.4
44+
env: SYMFONY_REQUIRE=4.4.*
5045
fast_finish: true
5146
allow_failures:
5247

5348
before_install:
5449
- phpenv config-rm xdebug.ini || true
55-
- composer self-update
56-
- composer validate --no-check-all --ansi
57-
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi;
58-
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
59-
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
50+
- composer global require --no-progress --no-scripts --no-plugins symfony/flex
6051

61-
install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS
52+
install: travis_wait composer update -n --prefer-stable --prefer-dist $COMPOSER_FLAGS
6253
script:
63-
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi
54+
- composer validate --no-check-all --ansi
55+
- make test
6456

6557
notifications:
6658
irc: "irc.freenode.org#symfony-cmf"

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
],
1717
"require": {
1818
"php": "^7.1",
19-
"symfony/routing": "^2.8 || ^3.3 || ^4.0",
20-
"symfony/http-kernel": "^2.8 || ^3.3 || ^4.0",
19+
"symfony/routing": "^3.4 || ^4.3",
20+
"symfony/http-kernel": "^3.4 || ^4.3",
2121
"psr/log": "^1.0"
2222
},
2323
"require-dev": {
2424
"symfony/phpunit-bridge": "^4.2.2",
25-
"symfony/dependency-injection": "^2.8 || ^3.3 || ^4.0",
26-
"symfony/config": "^2.8 || ^3.3 || ^4.0",
27-
"symfony/event-dispatcher": "^2.8 || ^3.3 || ^4.0",
25+
"symfony/dependency-injection": "^3.4 || ^4.3",
26+
"symfony/config": "^3.4 || ^4.3",
27+
"symfony/event-dispatcher": "^3.4 || ^4.3",
2828
"symfony-cmf/testing": "^2.1.0"
2929
},
3030
"suggest": {
31-
"symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)"
31+
"symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (^3.4 || ^4.3)"
3232
},
3333
"autoload": {
3434
"psr-4": {
@@ -42,7 +42,7 @@
4242
},
4343
"extra": {
4444
"branch-alias": {
45-
"dev-master": "2.1-dev"
45+
"dev-master": "2.2-dev"
4646
}
4747
}
4848
}

tests/Unit/Routing/DynamicRouterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function testMatchUrl()
190190
$this->enhancer->expects($this->once())
191191
->method('enhance')
192192
->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) {
193-
return DynamicRouterTest::URL === $request->server->get('REQUEST_URI');
193+
return self::URL === $request->server->get('REQUEST_URI');
194194
}))
195195
->will($this->returnValue($expected))
196196
;
@@ -215,7 +215,7 @@ public function testMatchRequestWithUrlMatcher()
215215
$this->enhancer->expects($this->once())
216216
->method('enhance')
217217
->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) {
218-
return DynamicRouterTest::URL === $request->server->get('REQUEST_URI');
218+
return self::URL === $request->server->get('REQUEST_URI');
219219
}))
220220
->will($this->returnValue($expected))
221221
;
@@ -243,7 +243,7 @@ public function testMatchRequest()
243243
$this->enhancer->expects($this->once())
244244
->method('enhance')
245245
->with($this->equalTo($routeDefaults), $this->callback(function (Request $request) use ($test) {
246-
return DynamicRouterTest::URL === $request->server->get('REQUEST_URI');
246+
return self::URL === $request->server->get('REQUEST_URI');
247247
}))
248248
->will($this->returnValue($expected))
249249
;

0 commit comments

Comments
 (0)