Skip to content

bump to php 7.1 minimum #140

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 3 commits into from
Jun 24, 2019
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
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ cache:
- $HOME/.composer/cache/files

php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
Expand All @@ -24,18 +21,18 @@ branches:
- /^analysis-.*$/

matrix:
allow_failures:
- php: 7.3
fast_finish: true
include:
- name: PHPSpec code coverage
php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" PULI_VERSION=1.0.0-beta9 DEPENDENCIES="henrikbjorn/phpspec-code-coverage:^2.0.2"
php: 7.1
# Disable code coverage until https://github.com/leanphp/phpspec-code-coverage/pull/38 is released
# DEPENDENCIES="leanphp/phpspec-code-coverage:^4.2" TEST_COMMAND="composer test-ci"
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test" PULI_VERSION=1.0.0-beta9
- name: PHPUnit tests
php: 7.2
php: 7.3
env: TEST_COMMAND="./vendor/bin/phpunit" DEPENDENCIES="phpunit/phpunit:^7.5 nyholm/psr7:^1.0 kriswallsmith/buzz:^1.0@beta php-http/curl-client:^1.0 php-http/message"
- name: PHPUnit test with nothing installed
php: 7.2
php: 7.3
env: TEST_COMMAND="./vendor/bin/phpunit --group=NothingInstalled" DEPENDENCIES="phpunit/phpunit:^7.5"

before_install:
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
}
],
"require": {
"php": "^5.5 || ^7.0"
"php": "^7.1"
},
"require-dev": {
"php-http/httplug": "^1.0 || ^2.0",
"php-http/message-factory": "^1.0",
"puli/composer-plugin": "1.0.0-beta10",
"phpspec/phpspec": "^2.4"
"phpspec/phpspec": "^5.1",
"akeneo/phpspec-skip-example-extension": "^4.0"
},
"suggest": {
"puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.",
Expand All @@ -39,7 +40,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
"dev-master": "1.7-dev"
}
},
"conflict": {
Expand Down
3 changes: 2 additions & 1 deletion phpspec.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ suites:
formatter.name: pretty
bootstrap: spec/autoload.php
extensions:
- PhpSpec\Extension\CodeCoverageExtension
LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~
Akeneo\SkipExampleExtension: ~
code_coverage:
format: clover
output: build/coverage.xml
2 changes: 2 additions & 0 deletions phpspec.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ suites:
psr4_prefix: Http\Discovery
formatter.name: pretty
bootstrap: spec/autoload.php
extensions:
Akeneo\SkipExampleExtension: ~
5 changes: 4 additions & 1 deletion spec/Strategy/PuliSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Puli\Repository\Api\ResourceRepository;
use PhpSpec\ObjectBehavior;

/**
* @require \NotPHP73
*/
class PuliSpec extends ObjectBehavior
{
function let(
Expand Down Expand Up @@ -67,7 +70,7 @@ function it_returns_a_class_binding_with_dependency(
}


public function getMatchers()
public function getMatchers(): array
{
return [
'haveCandidate' => function ($subject, $class, $condition) {
Expand Down
6 changes: 6 additions & 0 deletions spec/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
'Puli\\GeneratedPuliFactory' => __DIR__.'/../.puli/GeneratedPuliFactory.php',
]);
}

if (PHP_VERSION_ID >= 70300 && PHP_VERSION_ID < 70400) {
class PHP73 {}
} else {
class NotPHP73 {}
}