From 497c153b04cbb53ae4ae22d2d132e27e6a894f8d Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Mon, 30 Jan 2023 18:23:04 +0000 Subject: [PATCH 1/2] Support PHP8 --- .travis.yml | 6 +++++- composer.json | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d79f789..9c16d95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,10 @@ php: - 5.5 - 5.6 - 7.0 + - 7.4 + - 8.0 + - 8.1 + - 8.2 - hhvm install: @@ -18,4 +22,4 @@ script: - ./vendor/bin/phpcs --standard=psr2 ./src after_script: - - ./vendor/bin/coveralls -v --exclude-no-stmt \ No newline at end of file + - ./vendor/bin/coveralls -v --exclude-no-stmt diff --git a/composer.json b/composer.json index 43f4e8b..f9a452b 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,13 @@ }, "require": { "psr/http-message": "^1.0", - "guzzlehttp/psr7": "^1.2" + "guzzlehttp/psr7": "^1.2 || ^2.4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "zendframework/zend-diactoros": "^1.1", - "squizlabs/php_codesniffer": "^2.3", - "satooshi/php-coveralls": "^0.6.1", + "phpunit/phpunit": "^4.8 || ^8.5 || ^9.5", + "laminas/laminas-diactoros": "^1.1 || ^2.0", + "squizlabs/php_codesniffer": "^2.3 || ^3.7", + "php-coveralls/php-coveralls": "^1.1 || ^2.5", "jameshalsall/licenser": "dev-master" }, "scripts": { From bb1e45f850f3826f9f0868b464ed6059840bbfdf Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Mon, 30 Jan 2023 18:26:30 +0000 Subject: [PATCH 2/2] Fix tests. --- composer.json | 3 ++- tests/ProviderTest.php | 5 +++-- tests/Validator/SetSpecValidatorTest.php | 8 +++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index f9a452b..b0028f4 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "laminas/laminas-diactoros": "^1.1 || ^2.0", "squizlabs/php_codesniffer": "^2.3 || ^3.7", "php-coveralls/php-coveralls": "^1.1 || ^2.5", - "jameshalsall/licenser": "dev-master" + "jameshalsall/licenser": "dev-master", + "ext-dom": "*" }, "scripts": { "post-install-cmd": [ diff --git a/tests/ProviderTest.php b/tests/ProviderTest.php index 6d146c2..784313c 100644 --- a/tests/ProviderTest.php +++ b/tests/ProviderTest.php @@ -20,6 +20,8 @@ namespace Test\Picturae\OaiPmh; +use Laminas\Diactoros\ServerRequest; +use PHPUnit\Framework\TestCase; use Picturae\OaiPmh\Exception\BadResumptionTokenException; use Picturae\OaiPmh\Exception\IdDoesNotExistException; use Picturae\OaiPmh\Implementation\MetadataFormatType; @@ -30,9 +32,8 @@ use Picturae\OaiPmh\Implementation\Set; use Picturae\OaiPmh\Implementation\SetList; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -class ProviderTest extends \PHPUnit_Framework_TestCase +class ProviderTest extends TestCase { private function getProvider() { diff --git a/tests/Validator/SetSpecValidatorTest.php b/tests/Validator/SetSpecValidatorTest.php index 467696a..7ea0bfb 100644 --- a/tests/Validator/SetSpecValidatorTest.php +++ b/tests/Validator/SetSpecValidatorTest.php @@ -19,9 +19,11 @@ namespace Test\Picturae\OaiPmh\Validator; -class SetSpecValidatorTest extends \PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class SetSpecValidatorTest extends TestCase { - + /** * * @dataProvider validSpecProvider @@ -34,7 +36,7 @@ public function testValidSpec($value, $expected) $return = $header->isValid($value); $this->assertEquals($expected, $return); } - + public function validSpecProvider() { return [