Skip to content

Commit

Permalink
Dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
sirn-se committed Aug 21, 2023
1 parent 152f166 commit a668499
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore
README.md export-ignore
tests/ export-ignore
23 changes: 19 additions & 4 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,31 @@ jobs:
- name: Test
run: make test

test-8-3:
runs-on: ubuntu-latest
name: Test PHP 8.3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: Composer
run: make deps-install
- name: Test
run: make test

cs-check:
runs-on: ubuntu-latest
name: Code standard
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PHP 8.1
- name: Set up PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
- name: Composer
run: make deps-install
- name: Code standard
Expand All @@ -84,10 +99,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PHP 8.1
- name: Set up PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: xdebug
- name: Composer
run: make deps-install
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class Phrity\Net\UriFactory implements Psr\Http\Message\UriFactoryInterface

| Version | PHP | |
| --- | --- | --- |
| `1.3` | `^7.4\|^8.0` | |
| `1.2` | `^7.4\|^8.0` | IDNA modifier |
| `1.1` | `^7.4\|^8.0` | Require port, Absolute path, Normalize path modifiers |
| `1.0` | `^7.4\|^8.0` | Initial version |
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
],
"autoload": {
"psr-4": {
"": "src/"
"Phrity\\Net\\": "src/"
}
},
"require": {
"php": "^7.4|^8.0",
"php": "^7.4 | ^8.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0 || ^2.0"
"psr/http-message": "^1.0 | ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^9.0 | ^10.0",
"php-coveralls/php-coveralls": "^2.0",
"squizlabs/php_codesniffer": "^3.0"
}
Expand Down
13 changes: 7 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">./src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd">
<coverage/>
<testsuites>
<testsuite name="Phrity tests">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
File renamed without changes.
File renamed without changes.
32 changes: 16 additions & 16 deletions tests/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testValidUri($uri_string): void
$this->assertSame($uri_string, (string) $uri);
}

public function provideValidUris(): array
public static function provideValidUris(): array
{
return [
['urn:path-rootless'],
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testInvalidUri($uri_string): void
$uri = new Uri($uri_string);
}

public function provideInvalidUris(): array
public static function provideInvalidUris(): array
{
return [
['urn://host:with:colon'], // only colons within [] for ipv6
Expand All @@ -149,7 +149,7 @@ public function testValidPort($port, $expected): void
$this->assertSame($expected, $uri->getPort());
}

public function provideValidPorts(): array
public static function provideValidPorts(): array
{
return [
[null, null],
Expand All @@ -168,7 +168,7 @@ public function testInvalidPort($port): void
$uri = (new Uri())->withPort($port);
}

public function provideInvalidPorts(): array
public static function provideInvalidPorts(): array
{
return [
[100000],
Expand Down Expand Up @@ -198,7 +198,7 @@ public function testNotDefaultPort($scheme, $port): void
$this->assertSame("{$scheme}://domain.tld:{$port}", (string)$uri);
}

public function provideDefaultPorts(): array
public static function provideDefaultPorts(): array
{
return [
['acap', 674],
Expand Down Expand Up @@ -272,7 +272,7 @@ public function testValidScheme($scheme, $expected): void
$this->assertSame($expected, $uri->getScheme());
}

public function provideValidSchemes(): array
public static function provideValidSchemes(): array
{
return [
[null, ''],
Expand All @@ -292,7 +292,7 @@ public function testInvalidScheme($scheme): void
$uri = (new Uri())->withScheme($scheme);
}

public function provideInvalidSchemes(): array
public static function provideInvalidSchemes(): array
{
return [
[[]],
Expand All @@ -314,7 +314,7 @@ public function testValidHost($host, $expected): void
$this->assertSame($expected, $uri->getHost());
}

public function provideValidHosts(): array
public static function provideValidHosts(): array
{
return [
[null, ''],
Expand All @@ -335,7 +335,7 @@ public function testInvalidHost($host): void
$uri = (new Uri())->withHost($host);
}

public function provideInvalidHosts(): array
public static function provideInvalidHosts(): array
{
return [
[[]],
Expand All @@ -354,7 +354,7 @@ public function testValidPath($path, $expected): void
$this->assertSame($expected, $uri->getPath());
}

public function provideValidPaths(): array
public static function provideValidPaths(): array
{
return [
[null, ''],
Expand All @@ -381,7 +381,7 @@ public function testInvalidPaths($path): void
$uri = (new Uri())->withPath($path);
}

public function provideInvalidPaths(): array
public static function provideInvalidPaths(): array
{
return [
[[]],
Expand All @@ -408,7 +408,7 @@ public function testValidQuery($query, $expected): void
$this->assertSame($expected, $uri->getQuery());
}

public function provideValidQueries(): array
public static function provideValidQueries(): array
{
return [
[null, ''],
Expand All @@ -433,7 +433,7 @@ public function testInvalidQuery($query): void
$uri = (new Uri())->withQuery($query);
}

public function provideInvalidQueries(): array
public static function provideInvalidQueries(): array
{
return [
[[]],
Expand All @@ -452,7 +452,7 @@ public function testValidFragment($fragment, $expected): void
$this->assertSame($expected, $uri->getFragment());
}

public function provideValidFragments(): array
public static function provideValidFragments(): array
{
return [
[null, ''],
Expand All @@ -476,7 +476,7 @@ public function testInvalidFragment($fragment): void
$uri = (new Uri())->withFragment($fragment);
}

public function provideInvalidFragments(): array
public static function provideInvalidFragments(): array
{
return [
[[]],
Expand All @@ -497,7 +497,7 @@ public function testValidUserInfo($user, $pass, $expected, $include): void
$this->assertSame("http://{$uri->getAuthority()}", (string)$uri);
}

public function provideValidUserInfos(): array
public static function provideValidUserInfos(): array
{
return [
[null, null, '', ''],
Expand Down

0 comments on commit a668499

Please sign in to comment.