Skip to content
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

Also tests for PHP 7.1. #69

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm

matrix:
Expand All @@ -18,16 +19,15 @@ branches:

before_install:
- wget https://github.com/satooshi/php-coveralls/releases/download/v0.7.0/coveralls.phar
- wget -O phpunit.phar https://phar.phpunit.de/phpunit-4.8.27.phar

install:
- composer self-update
- composer install
- travis_retry composer self-update
- travis_retry composer install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, did you have problems with composer failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a common practice to avoid timeouts: https://docs.travis-ci.com/user/common-build-problems/


script:
- vendor/bin/parallel-lint src/
- vendor/bin/parallel-lint tests/
- php phpunit.phar -v
- vendor/bin/phpunit -v

after_success:
- travis_retry php coveralls.phar -v
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"require-dev": {
"php-vcr/phpunit-testlistener-vcr": "^1.1",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"jakub-onderka/php-console-highlighter": "^0.3.2"
"jakub-onderka/php-console-highlighter": "^0.3.2",
"phpunit/phpunit": "~4.8 || ~5.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of this, I've had conflicts with dependencies I've considered integrating with the SDK before. Whatever can safely stay outside of composer should. (I realise that's a bit of a pain in a number of ways but pain > dependency conflicts)

Instead I'd modify this line to conditionally load a different version of phpunit. https://github.com/contentful/contentful.php/pull/69/files#diff-354f30a63fb0907d4ad57269548329e3L21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact is that this dependency has actually been properly resolved by composer. see: https://travis-ci.org/contentful/contentful.php/builds/215916416

Also this allows any people to test locally PR they submit to this repo, without forcing them to install globally a specific phpunit version

Copy link
Contributor Author

@lucasmichot lucasmichot Mar 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"autoload": {
"psr-4": {
Expand Down