Skip to content

Commit e4b0fd2

Browse files
authored
Merge pull request #16 from SymfonyTest/req
Actually requiring symfony dependencies
2 parents 9c6a629 + 85b24bb commit e4b0fd2

File tree

2 files changed

+55
-29
lines changed

2 files changed

+55
-29
lines changed

.travis.yml

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,66 @@
11
language: php
2-
dist: precise
3-
2+
sudo: false
43
cache:
5-
directories:
6-
- $HOME/.composer/cache
4+
directories:
5+
- $HOME/.composer/cache/files
6+
- $HOME/symfony-bridge/.phpunit
7+
78
branches:
89
except:
910
- /^analysis-.*$/
1011
- /^patch-.*$/
1112

12-
php:
13-
- 5.5
14-
- 7.1
15-
1613
env:
17-
global:
18-
- TEST_COMMAND="composer test"
19-
matrix:
20-
- SYMFONY_VERSION=3.3.*
21-
- SYMFONY_VERSION=2.3.*
14+
global:
15+
- TEST_COMMAND="composer test"
16+
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
2217

2318
matrix:
24-
fast_finish: true
25-
include:
26-
- php: 5.5
27-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.3.*
28-
- php: hhvm
29-
env: SYMFONY_VERSION=2.7.*
30-
dist: trusty
31-
- php: 7.0
32-
env: SYMFONY_VERSION=2.8.*
33-
- php: 7.1
34-
env: SYMFONY_VERSION=4.0.*
19+
fast_finish: true
20+
include:
21+
# Minimum supported dependencies with the latest and oldest PHP version
22+
- php: 7.2
23+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
24+
- php: 5.5
25+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
26+
27+
- php: 7.1
28+
env: COVERAGE=true TEST_COMMAND="composer test-ci"
29+
30+
# Test the latest stable release
31+
- php: 5.5
32+
- php: 5.6
33+
- php: 7.0
34+
- php: 7.2
35+
- php: hhvm
36+
dist: trusty
37+
- php: 7.1
38+
env: DEPENDENCIES="dunglas/symfony-lock:^2"
39+
- php: 7.1
40+
env: DEPENDENCIES="dunglas/symfony-lock:^3"
41+
- php: 7.1
42+
env: DEPENDENCIES="dunglas/symfony-lock:^4"
43+
44+
# Latest commit to master
45+
- php: 7.2
46+
env: STABILITY="dev"
47+
48+
allow_failures:
49+
# Dev-master is allowed to fail.
50+
- env: STABILITY="dev"
51+
52+
before_install:
53+
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
54+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
55+
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
3556

3657
install:
37-
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
38-
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
58+
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
59+
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
60+
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
3961

4062
script:
63+
- composer validate --strict --no-check-lock
4164
- $TEST_COMMAND
4265

4366
after_success:

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^5.5 || ^7.0"
13+
"php": "^5.5 || ^7.0",
14+
"symfony/dependency-injection": "^2.3 || ^3.0 || ^4.0",
15+
"symfony/framework-bundle": "^2.3 || ^3.0 || ^4.0",
16+
"symfony/http-kernel": "^2.3 || ^3.0 || ^4.0",
17+
"symfony/yaml": "^2.3 || ^3.0 || ^4.0"
1418
},
1519
"require-dev": {
16-
"phpunit/phpunit": "^4.8.36 || ^5.5 || ^6.2",
17-
"symfony/symfony": "^2.3 || ^3.0 || ^4.0"
20+
"phpunit/phpunit": "^4.8.36 || ^5.5 || ^6.2"
1821
},
1922
"autoload": {
2023
"psr-4": { "Nyholm\\BundleTest\\": "src/" }

0 commit comments

Comments
 (0)