From 960cdf0b8885ab64b2b47f7181dc4f214fcd8f1f Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 20 Jun 2019 08:35:04 +0200 Subject: [PATCH 1/3] bump to php 7.1 minimum --- .travis.yml | 11 +++-------- composer.json | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77c5ea3..f4875d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,6 @@ cache: - $HOME/.composer/cache/files php: - - 5.5 - - 5.6 - - 7.0 - 7.1 - 7.2 - 7.3 @@ -24,18 +21,16 @@ branches: - /^analysis-.*$/ matrix: - allow_failures: - - php: 7.3 fast_finish: true include: - name: PHPSpec code coverage - php: 5.5 + php: 7.1 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" - 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: diff --git a/composer.json b/composer.json index e6b6414..0817fec 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": "^5.5 || ^7.0" + "php": "^7.1" }, "require-dev": { "php-http/httplug": "^1.0 || ^2.0", @@ -39,7 +39,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.7-dev" } }, "conflict": { From 70a41500351747fa4f18ec6d7b0e118d379daf41 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Mon, 24 Jun 2019 17:39:32 +0200 Subject: [PATCH 2/3] Dont run Puli tests on PHP7.3 --- composer.json | 3 ++- phpspec.ci.yml | 3 ++- phpspec.yml.dist | 2 ++ spec/Strategy/PuliSpec.php | 5 ++++- spec/autoload.php | 6 ++++++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 0817fec..7a8e424 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "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.", diff --git a/phpspec.ci.yml b/phpspec.ci.yml index fc7033d..4ab23b4 100644 --- a/phpspec.ci.yml +++ b/phpspec.ci.yml @@ -5,7 +5,8 @@ suites: formatter.name: pretty bootstrap: spec/autoload.php extensions: - - PhpSpec\Extension\CodeCoverageExtension + PhpSpec\Extension\CodeCoverageExtension: ~ + Akeneo\SkipExampleExtension: ~ code_coverage: format: clover output: build/coverage.xml diff --git a/phpspec.yml.dist b/phpspec.yml.dist index 65d218e..2707b63 100644 --- a/phpspec.yml.dist +++ b/phpspec.yml.dist @@ -4,3 +4,5 @@ suites: psr4_prefix: Http\Discovery formatter.name: pretty bootstrap: spec/autoload.php +extensions: + Akeneo\SkipExampleExtension: ~ diff --git a/spec/Strategy/PuliSpec.php b/spec/Strategy/PuliSpec.php index 4be65f9..f3765a2 100644 --- a/spec/Strategy/PuliSpec.php +++ b/spec/Strategy/PuliSpec.php @@ -11,6 +11,9 @@ use Puli\Repository\Api\ResourceRepository; use PhpSpec\ObjectBehavior; +/** + * @require \NotPHP73 + */ class PuliSpec extends ObjectBehavior { function let( @@ -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) { diff --git a/spec/autoload.php b/spec/autoload.php index 1f0ffd1..3b1228e 100644 --- a/spec/autoload.php +++ b/spec/autoload.php @@ -7,3 +7,9 @@ 'Puli\\GeneratedPuliFactory' => __DIR__.'/../.puli/GeneratedPuliFactory.php', ]); } + +if (PHP_VERSION_ID >= 70300 && PHP_VERSION_ID < 70400) { + class PHP73 {} +} else { + class NotPHP73 {} +} From 55c5abdf1d8ebc19350d3620327c145a098481e9 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Mon, 24 Jun 2019 17:51:39 +0200 Subject: [PATCH 3/3] Disable test coverage --- .travis.yml | 4 +++- phpspec.ci.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4875d3..bbca139 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,9 @@ matrix: include: - name: PHPSpec code coverage php: 7.1 - 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" + # 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.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" diff --git a/phpspec.ci.yml b/phpspec.ci.yml index 4ab23b4..1cc37e3 100644 --- a/phpspec.ci.yml +++ b/phpspec.ci.yml @@ -5,7 +5,7 @@ suites: formatter.name: pretty bootstrap: spec/autoload.php extensions: - PhpSpec\Extension\CodeCoverageExtension: ~ + LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~ Akeneo\SkipExampleExtension: ~ code_coverage: format: clover