Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
13 changes: 6 additions & 7 deletions tests/Util/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
}

Expand Down Expand Up @@ -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']);
}

Expand All @@ -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);
}
Expand Down