Skip to content

Commit 62ed9f1

Browse files
committed
Merge branch 'develop'
* develop: use blackbox 5
2 parents 3694ba0 + 9963553 commit 62ed9f1

19 files changed

+66
-51
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, macOS-latest]
11-
php-version: ['8.0', '8.1']
11+
php-version: ['8.2']
1212
dependencies: ['lowest', 'highest']
1313
name: 'Tests'
1414
steps:
@@ -45,7 +45,7 @@ jobs:
4545
strategy:
4646
matrix:
4747
os: [ubuntu-latest, macOS-latest]
48-
php-version: ['8.0', '8.1']
48+
php-version: ['8.2']
4949
dependencies: ['lowest', 'highest']
5050
name: 'Fixtures'
5151
steps:
@@ -81,7 +81,7 @@ jobs:
8181
runs-on: ubuntu-latest
8282
strategy:
8383
matrix:
84-
php-version: ['8.0', '8.1']
84+
php-version: ['8.2']
8585
dependencies: ['lowest', 'highest']
8686
name: 'Psalm'
8787
steps:
@@ -113,7 +113,7 @@ jobs:
113113
runs-on: ubuntu-latest
114114
strategy:
115115
matrix:
116-
php-version: ['8.0']
116+
php-version: ['8.2']
117117
name: 'CS'
118118
steps:
119119
- name: Checkout

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22

3-
## [Unreleased]
3+
## 4.2.0 - 2023-07-08
4+
5+
### Changed
6+
7+
- Require `innmind/black-box` `5`
8+
9+
### Removed
10+
11+
- Support for PHP `8.0` and `8.1`
412

513
## 4.1.0 - 2022-01-23
614

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"issues": "http://github.com/Innmind/Url/issues"
1616
},
1717
"require": {
18-
"php": "~8.0",
19-
"innmind/immutable": "~4.0",
18+
"php": "~8.2",
19+
"innmind/immutable": "~4.15",
2020
"league/uri-parser": "~1.2",
2121
"league/uri-components": "~2.0"
2222
},
@@ -32,18 +32,18 @@
3232
}
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "~9.5",
36-
"vimeo/psalm": "~4.1",
37-
"innmind/black-box": "^4.5",
35+
"phpunit/phpunit": "~10.2",
36+
"vimeo/psalm": "~5.13",
37+
"innmind/black-box": "~5.0",
3838
"innmind/coding-standard": "~2.0"
3939
},
4040
"conflict": {
41-
"innmind/black-box": "<4.0|~5.0"
41+
"innmind/black-box": "<5.0|~6.0"
4242
},
4343
"suggest": {
4444
"innmind/black-box": "For property based testing"
4545
},
4646
"provide": {
47-
"innmind/black-box-sets": "4.0"
47+
"innmind/black-box-sets": "5.0"
4848
}
4949
}

fixtures/Authority.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ static function($userInfo, $host, $port): Model {
1818
return Model::of($userInfo, $host, $port);
1919
},
2020
Authority\UserInformation::any(),
21-
new Set\Either(
21+
Set\Either::any(
2222
Authority\Host::any(),
2323
Set\Elements::of(Model\Host::none()),
2424
),
25-
new Set\Either(
25+
Set\Either::any(
2626
Authority\Port::any(),
2727
Set\Elements::of(Model\Port::none()),
2828
),

fixtures/Authority/UserInformation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ final class UserInformation
1313
*/
1414
public static function any(): Set
1515
{
16-
return new Set\Either(
16+
return Set\Either::any(
1717
Set\Composite::immutable(
1818
static function($user, $password): Model {
1919
return Model::of($user, $password);
2020
},
2121
UserInformation\User::any(),
22-
new Set\Either(
22+
Set\Either::any(
2323
UserInformation\Password::any(),
2424
Set\Elements::of(Model\Password::none()),
2525
),

fixtures/Url.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ static function($scheme, $authority, $path, $query, $fragment): Model {
2424
return new Model($scheme, $authority, $path, $query, $fragment);
2525
},
2626
Scheme::any(),
27-
new Set\Either(
27+
Set\Either::any(
2828
Authority::any(),
2929
Set\Elements::of(AuthorityModel::none()),
3030
),
31-
new Set\Either(
31+
Set\Either::any(
3232
Path::any(),
3333
Set\Elements::of(PathModel::none()),
3434
),
35-
new Set\Either(
35+
Set\Either::any(
3636
Query::any(),
3737
Set\Elements::of(QueryModel::none()),
3838
),
39-
new Set\Either(
39+
Set\Either::any(
4040
Fragment::any(),
4141
Set\Elements::of(FragmentModel::none()),
4242
),

phpunit.xml.dist

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" printerClass="Innmind\BlackBox\PHPUnit\ResultPrinterV9" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd">
3+
<extensions>
4+
<bootstrap class="Innmind\BlackBox\PHPUnit\Extension">
5+
</bootstrap>
6+
</extensions>
7+
<coverage/>
8+
<testsuites>
9+
<testsuite name="Url test suite">
10+
<directory>./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
<source>
414
<include>
515
<directory>.</directory>
616
</include>
@@ -9,10 +19,5 @@
919
<directory>./vendor</directory>
1020
<directory>./fixtures</directory>
1121
</exclude>
12-
</coverage>
13-
<testsuites>
14-
<testsuite name="Url test suite">
15-
<directory>./tests</directory>
16-
</testsuite>
17-
</testsuites>
22+
</source>
1823
</phpunit>

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="1"
4+
findUnusedBaselineEntry="true"
5+
findUnusedCode="false"
46
resolveFromConfigFile="true"
57
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
68
xmlns="https://getpsalm.org/schema/config"

tests/Fixtures/Authority/UserInformation/PasswordTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use PHPUnit\Framework\TestCase;
99
use Innmind\BlackBox\{
1010
Set,
11-
Random\RandomInt,
11+
Random,
1212
};
1313

1414
class PasswordTest extends TestCase
@@ -22,7 +22,7 @@ public function testInterface()
2222

2323
$this->assertInstanceOf(Set::class, $set);
2424

25-
foreach ($set->values(new RandomInt) as $value) {
25+
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
2727
$this->assertTrue($value->isImmutable());
2828
$this->assertInstanceOf(Model::class, $value->unwrap());

tests/Fixtures/Authority/UserInformation/UserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use PHPUnit\Framework\TestCase;
99
use Innmind\BlackBox\{
1010
Set,
11-
Random\RandomInt,
11+
Random,
1212
};
1313

1414
class UserTest extends TestCase
@@ -22,7 +22,7 @@ public function testInterface()
2222

2323
$this->assertInstanceOf(Set::class, $set);
2424

25-
foreach ($set->values(new RandomInt) as $value) {
25+
foreach ($set->values(Random::default) as $value) {
2626
$this->assertInstanceOf(Set\Value::class, $value);
2727
$this->assertTrue($value->isImmutable());
2828
$this->assertInstanceOf(Model::class, $value->unwrap());

0 commit comments

Comments
 (0)