From 6b8c2584042faa951735bae1a1b8748dc6f681a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Isaert?= Date: Wed, 21 Jun 2023 16:18:14 +0200 Subject: [PATCH] Chore: Bump required PHP version to 8.0 and other packages (#4) --- .gitignore | 3 ++- .travis.yml | 7 +++---- README.md | 2 +- composer.json | 16 ++++++++-------- phpunit.xml.dist | 12 +++++++----- tests/UriFactoryTest.php | 11 ++++------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 8925195..14f4019 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea vendor -composer.lock \ No newline at end of file +composer.lock +.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index 74f8b48..54982b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,9 @@ dist: xenial language: php php: - - '7.1' - - '7.2' - - '7.3' - - '7.4' + - '8.0' + - '8.1' + - '8.2' - 'nightly' diff --git a/README.md b/README.md index a435a21..83c8a3f 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ echo canonicalize(uri($url)); // http://example.org/bar/ ## Installation -PHP 7.1+ is required. +PHP 8.0+ is required. > composer require bentools/uri-factory diff --git a/composer.json b/composer.json index e10d23f..977ef51 100644 --- a/composer.json +++ b/composer.json @@ -13,19 +13,19 @@ "type": "library", "license": "MIT", "require": { - "php": ">=7.1", + "php": ">=8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { - "guzzlehttp/psr7": "^1.4", - "league/uri": "^5.0", - "nyholm/psr7": "^1.1", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "~6.0|~7.0", + "guzzlehttp/psr7": "^2.5", + "league/uri": "^5.3", + "nyholm/psr7": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^9.6", "ringcentral/psr7": "^1.3", "squizlabs/php_codesniffer": "@stable", - "symfony/var-dumper": "^3.3" + "symfony/var-dumper": "^5.4 || ^6.2" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3ba3f66..fffd8fa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,6 @@ - tests - - + + src - - + + diff --git a/tests/UriFactoryTest.php b/tests/UriFactoryTest.php index f4ff796..1b5a7e6 100644 --- a/tests/UriFactoryTest.php +++ b/tests/UriFactoryTest.php @@ -2,13 +2,11 @@ namespace BenTools\UriFactory\Tests; -use BenTools\UriFactory\Adapter\GuzzleAdapter; -use BenTools\UriFactory\Adapter\LeagueUriAdapter; use BenTools\UriFactory\UriFactory; -use GuzzleHttp\Psr7\Uri as GuzzleUri; -use League\Uri\Http as LeagueUri; use PHPUnit\Framework\TestCase; use Psr\Http\Message\UriInterface; +use RuntimeException; + use function BenTools\UriFactory\Helper\current_location; use function BenTools\UriFactory\Helper\uri; @@ -37,11 +35,10 @@ public function testRequestUri() unset($_SERVER['REQUEST_URI'], $_SERVER['HTTP_HOST']); } - /** - * @expectedException \RuntimeException - */ public function testRequestUriFailsOnCli() { + $this->expectException(RuntimeException::class); + current_location(); } }