diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 685188c..b85b2e4 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4'] + php-versions: ['7.3', '7.4', '8.0', '8.1'] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/README.md b/README.md index 59ddb29..4bc20f1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A collection of general util-httpities for making common programming tasks easie ## Requirements -util-http-php requires PHP 7.0 (or later). +util-http-php requires PHP 7.3 (or later). ## Composer diff --git a/composer.json b/composer.json index 0028afd..ee3361f 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,10 @@ "sort-packages": true }, "require": { - "php": "^7.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0", + "phpunit/phpunit": "^9.0", "squizlabs/php_codesniffer": "^3.2" }, "autoload": { diff --git a/tests/Util/HttpTest.php b/tests/Util/HttpTest.php index 8a2e372..930880b 100644 --- a/tests/Util/HttpTest.php +++ b/tests/Util/HttpTest.php @@ -104,13 +104,12 @@ public function parseHeadersMethodAndUrlSet() * @group unit * @covers ::parseHeaders * - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage $rawHeaders cannot be whitespace - * * @return void */ public function parseHeadersWhitespace() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('$rawHeaders cannot be whitespace'); Http::parseHeaders(''); } @@ -236,13 +235,13 @@ public function getQueryParamsWithCollapsed() /** * @test * @covers ::getQueryParams - * @expectedException \Exception - * @expectedExceptionMessage Parameter 'stuff' had more than one value but in $collapsedParams * * @return void */ public function getQueryParamsCollapsedMoreThanOneValue() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Parameter \'stuff\' had more than one value but in $collapsedParams'); Http::getQueryParams('http://foo.com/bar/?stuff=yeah&stuff=boy&moreStuff=mhmm', ['stuff']); } @@ -262,13 +261,13 @@ public function getQueryParamsCollapsed() /** * @test * @covers ::getQueryParamsCollapsed - * @expectedException \Exception - * @expectedExceptionMessage Parameter 'boo' is not expected to be an array, but array given * * @return void */ public function getQueryParamsCollapsedUnexpectedArray() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Parameter \'boo\' is not expected to be an array, but array given'); $url = 'http://foo.com/bar/?boo=1&foo=bar&boo=2'; Http::getQueryParamsCollapsed($url); }