Skip to content

Commit

Permalink
Chore: Bump required PHP version to 8.0 and other packages (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
misaert authored Jun 21, 2023
1 parent 3edd771 commit 6b8c258
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
vendor
composer.lock
composer.lock
.phpunit.result.cache
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ dist: xenial
language: php

php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- 'nightly'


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
12 changes: 7 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
Expand All @@ -14,14 +15,15 @@
stopOnError="false"
stopOnFailure="false"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<testsuite name="tests">
<directory suffix="Test.php">tests</directory>
</testsuite>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
11 changes: 4 additions & 7 deletions tests/UriFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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

0 comments on commit 6b8c258

Please sign in to comment.