Skip to content

Commit a3be7bc

Browse files
dbuNyholm
authored andcommitted
bump to php 7.1 minimum (#140)
* bump to php 7.1 minimum * Dont run Puli tests on PHP7.3 * Disable test coverage
1 parent 684855f commit a3be7bc

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

.travis.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ cache:
77
- $HOME/.composer/cache/files
88

99
php:
10-
- 5.5
11-
- 5.6
12-
- 7.0
1310
- 7.1
1411
- 7.2
1512
- 7.3
@@ -24,18 +21,18 @@ branches:
2421
- /^analysis-.*$/
2522

2623
matrix:
27-
allow_failures:
28-
- php: 7.3
2924
fast_finish: true
3025
include:
3126
- name: PHPSpec code coverage
32-
php: 5.5
33-
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"
27+
php: 7.1
28+
# Disable code coverage until https://github.com/leanphp/phpspec-code-coverage/pull/38 is released
29+
# DEPENDENCIES="leanphp/phpspec-code-coverage:^4.2" TEST_COMMAND="composer test-ci"
30+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test" PULI_VERSION=1.0.0-beta9
3431
- name: PHPUnit tests
35-
php: 7.2
32+
php: 7.3
3633
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"
3734
- name: PHPUnit test with nothing installed
38-
php: 7.2
35+
php: 7.3
3936
env: TEST_COMMAND="./vendor/bin/phpunit --group=NothingInstalled" DEPENDENCIES="phpunit/phpunit:^7.5"
4037

4138
before_install:

composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^5.5 || ^7.0"
14+
"php": "^7.1"
1515
},
1616
"require-dev": {
1717
"php-http/httplug": "^1.0 || ^2.0",
1818
"php-http/message-factory": "^1.0",
1919
"puli/composer-plugin": "1.0.0-beta10",
20-
"phpspec/phpspec": "^2.4"
20+
"phpspec/phpspec": "^5.1",
21+
"akeneo/phpspec-skip-example-extension": "^4.0"
2122
},
2223
"suggest": {
2324
"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.",
@@ -39,7 +40,7 @@
3940
},
4041
"extra": {
4142
"branch-alias": {
42-
"dev-master": "1.5-dev"
43+
"dev-master": "1.7-dev"
4344
}
4445
},
4546
"conflict": {

phpspec.ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ suites:
55
formatter.name: pretty
66
bootstrap: spec/autoload.php
77
extensions:
8-
- PhpSpec\Extension\CodeCoverageExtension
8+
LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~
9+
Akeneo\SkipExampleExtension: ~
910
code_coverage:
1011
format: clover
1112
output: build/coverage.xml

phpspec.yml.dist

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ suites:
44
psr4_prefix: Http\Discovery
55
formatter.name: pretty
66
bootstrap: spec/autoload.php
7+
extensions:
8+
Akeneo\SkipExampleExtension: ~

spec/Strategy/PuliSpec.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use Puli\Repository\Api\ResourceRepository;
1212
use PhpSpec\ObjectBehavior;
1313

14+
/**
15+
* @require \NotPHP73
16+
*/
1417
class PuliSpec extends ObjectBehavior
1518
{
1619
function let(
@@ -67,7 +70,7 @@ function it_returns_a_class_binding_with_dependency(
6770
}
6871

6972

70-
public function getMatchers()
73+
public function getMatchers(): array
7174
{
7275
return [
7376
'haveCandidate' => function ($subject, $class, $condition) {

spec/autoload.php

+6
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
'Puli\\GeneratedPuliFactory' => __DIR__.'/../.puli/GeneratedPuliFactory.php',
88
]);
99
}
10+
11+
if (PHP_VERSION_ID >= 70300 && PHP_VERSION_ID < 70400) {
12+
class PHP73 {}
13+
} else {
14+
class NotPHP73 {}
15+
}

0 commit comments

Comments
 (0)