-
Notifications
You must be signed in to change notification settings - Fork 53
Test against symfony versions #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
bae14a7
1cb572b
f1cb956
2f59b40
092d832
37d3698
7920c09
f066efb
14df844
8a5122a
566ad7f
24ed526
5d04ded
2a71c9b
88594a1
901d830
73d4ede
921ddba
518f86b
e9e9073
8d1403b
bceddc0
8c62d22
dcb2bca
9d5c846
dc97863
03ca9ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,6 @@ cache: | |
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- hhvm | ||
|
||
env: | ||
global: | ||
- TEST_COMMAND="composer test" | ||
|
@@ -27,18 +19,44 @@ branches: | |
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.1 | ||
env: DEPENDENCIES="minimum" | ||
|
||
# Test the latest stable release | ||
- php: 5.5 | ||
- php: 7.0 | ||
- php: 7.1 | ||
- php: 7.2 | ||
env: COVERAGE=true TEST_COMMAND="composer test-ci" DEPENDENCIES="henrikbjorn/phpspec-code-coverage:^1.0" | ||
|
||
# Test LTS versions | ||
- php: 5.4 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" | ||
env: DEPENDENCIES="symfony/lts:^2" | ||
- php: 5.5 | ||
env: DEPENDENCIES="symfony/lts:^3" | ||
|
||
# Latest dev release | ||
- php: 7.1 | ||
env: DEPENDENCIES="dev" | ||
|
||
allow_failures: | ||
# Latest beta is allowed to fail. | ||
- php: 7.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to specify the PHP version here. It will avoid having to keep it in sync when changing the version used by |
||
env: DEPENDENCIES="dev" | ||
|
||
before_install: | ||
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi | ||
- if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would instead just set |
||
- if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rename the var to |
||
- if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and then just test for |
||
|
||
install: | ||
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 | ||
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi | ||
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction | ||
|
||
script: | ||
- composer validate --strict --no-check-lock | ||
- $TEST_COMMAND | ||
|
||
after_success: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ private function isJson($stream) | |
|
||
json_decode($stream->getContents()); | ||
|
||
return json_last_error() == JSON_ERROR_NONE; | ||
return JSON_ERROR_NONE == json_last_error(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. strict comparison ? |
||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong comment