Skip to content

Add PHP requirements & travis fixes #6

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

Merged
merged 6 commits into from
Jul 10, 2017
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
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ cache:
php:
- 7.0
- 7.1
- hhvm

env:
global:
Expand All @@ -22,7 +21,7 @@ branches:
matrix:
fast_finish: true
include:
- php: 5.5
- php: 7.0
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"

before_install:
Expand All @@ -33,6 +32,9 @@ install:
- 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

before_script:
- vendor/bin/http_test_server > /dev/null 2>&1 &

script:
- $TEST_COMMAND

Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
}
},
"require": {
"amphp/artax": "^3",
"php": "^7.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be >=7.0 as PHP doesn't follow semantic versioning anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

But we do not support PHP8.

If one should be super strict we should write: 7.0.* || 7.1.*. Do you think we should do that?

Copy link
Collaborator

@kelunik kelunik Jul 10, 2017

Choose a reason for hiding this comment

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

Right, and we don't support 7.2 either strictly speaking, because it isn't in feature freeze yet. There are some BC breaks in every version of PHP. What's the purpose of restricting the upper bound? Most code will just run fine. As long as PHP itself isn't installed via Composer, I don't see any reason to restrict the upper bound, which will mostly just work fine for new versions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That said, PHP 8.0 is probably far enough away, so it's not too much work to bump it once every 5-10 years.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. That is why I suggested ^7.0 because 7.0.* || 7.1.* is overkill and >=7.0 is too generous.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Code that ran fine on 5.6 mostly runs fine on 7.0, but I don't care enough to discuss it further. Let's wait for 8.0.

Copy link
Member Author

Choose a reason for hiding this comment

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

True. It is a minor thing.

"amphp/artax": "^3.0",
"php-http/httplug": "^1.1",
"php-http/discovery": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^6.0",
"amphp/phpunit-util": "^1",
"php-http/client-integration-tests": "^0.6.0",
"php-http/message": "^1.6"
Expand All @@ -27,6 +29,7 @@
"php-http/client-implementation": "1.0"
},
"scripts": {
"test": "vendor/bin/phpunit"
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
}
}
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="Artax Adapter Test Suite">
<directory>test</directory>
<directory>tests/</directory>
</testsuite>
</testsuites>
<php>
Expand All @@ -16,4 +16,4 @@
<listeners>
<listener class="Amp\PHPUnit\LoopReset" />
</listeners>
</phpunit>
</phpunit>