diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189105d..2f3eecb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,3 @@ jobs: uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main cs: uses: innmind/github-workflows/.github/workflows/cs.yml@main - with: - php-version: '8.2' diff --git a/.github/workflows/extensive.yml b/.github/workflows/extensive.yml new file mode 100644 index 0000000..257f139 --- /dev/null +++ b/.github/workflows/extensive.yml @@ -0,0 +1,12 @@ +name: Extensive CI + +on: + push: + tags: + - '*' + paths: + - '.github/workflows/extensive.yml' + +jobs: + blackbox: + uses: innmind/github-workflows/.github/workflows/extensive.yml@main diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ca00c..cf58e85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [Unreleased] + +### Changed + +- Requires PHP `8.4` +- Requires `innmind/http:~9.0` + ## 5.2.0 - 2025-09-06 ### Added diff --git a/blackbox.php b/blackbox.php index 3785ad1..78fd2a0 100644 --- a/blackbox.php +++ b/blackbox.php @@ -10,6 +10,10 @@ }; Application::new($argv) + ->when( + \getenv('BLACKBOX_SET_SIZE') !== false, + static fn(Application $app) => $app->scenariiPerProof((int) \getenv('BLACKBOX_SET_SIZE')), + ) ->when( \getenv('ENABLE_COVERAGE') !== false, static fn(Application $app) => $app diff --git a/composer.json b/composer.json index 67fc7be..313d377 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,11 @@ "issues": "http://github.com/Innmind/Router/issues" }, "require": { - "php": "~8.2", - "innmind/url": "~4.1", - "innmind/immutable": "~5.20", - "innmind/http": "~8.0", - "innmind/url-template": "~3.0" + "php": "~8.4", + "innmind/url": "~5.0", + "innmind/immutable": "~6.0", + "innmind/http": "~9.0", + "innmind/url-template": "~4.0" }, "autoload": { "psr-4": { @@ -33,7 +33,7 @@ } }, "require-dev": { - "innmind/static-analysis": "^1.2.1", + "innmind/static-analysis": "~1.3", "innmind/black-box": "~6.5", "innmind/coding-standard": "~2.0" } diff --git a/proofs/router.php b/proofs/router.php index 6ccde92..49b60f3 100644 --- a/proofs/router.php +++ b/proofs/router.php @@ -127,7 +127,7 @@ static function($assert, $method, $protocolVersion) { $router = Router::of(Endpoint::of('/hello{/name}')); $result = $router($request)->unwrap(); - $assert->count(1, $result); + $assert->same(1, $result->size()); $assert->same( 'world', $result->get('name')->match( @@ -182,7 +182,7 @@ static function($assert, $method, $protocolVersion) { $router = Router::of(Host::of('example{.tld}/')); $result = $router($request)->unwrap(); - $assert->count(1, $result); + $assert->same(1, $result->size()); $assert->same( 'com', $result->get('tld')->match( diff --git a/src/Endpoint.php b/src/Endpoint.php index 90d9c9d..90f8bcc 100644 --- a/src/Endpoint.php +++ b/src/Endpoint.php @@ -39,8 +39,8 @@ static function() use ($request, $template) { ->withoutScheme() ->withoutAuthority(); - return match ($template->matches($url)) { - true => $template->extract($url), + return match ($template->matches($url)->unwrap()) { + true => $template->extract($url)->unwrap(), false => throw new Exception\NotFound, }; }, diff --git a/src/Host.php b/src/Host.php index 6d3e5de..f8147f8 100644 --- a/src/Host.php +++ b/src/Host.php @@ -46,8 +46,8 @@ static function() use ($request, $template) { ->withoutQuery() ->withoutFragment(); - return match ($template->matches($url)) { - true => $template->extract($url), + return match ($template->matches($url)->unwrap()) { + true => $template->extract($url)->unwrap(), false => throw new Exception\NotFound, }; },