From 0ab22dd49cd48e30f74a64428431a89c53d06897 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 16 Sep 2023 18:40:11 +0200 Subject: [PATCH 1/3] test against php 8.2 and 8.3 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ef3b2d..db6b765 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest] - php-version: ['8.1'] + php-version: ['8.1', '8.2', '8.3'] name: 'PHPUnit' steps: - name: Checkout @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1'] + php-version: ['8.1', '8.2', '8.3'] name: 'Psalm' steps: - name: Checkout From 0505e09fa2aac94ef3e1b94ad0ca992aeecb79f1 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 16 Sep 2023 18:44:18 +0200 Subject: [PATCH 2/3] use blackbox 5 --- .github/workflows/ci.yml | 6 +++--- .gitignore | 1 + CHANGELOG.md | 7 +++++++ composer.json | 8 ++++---- phpunit.xml.dist | 21 +++++++++++++-------- psalm.xml | 2 ++ src/Expression/Name.php | 5 ++++- tests/Expression/Level4/CompositeTest.php | 2 +- tests/ExpressionsTest.php | 2 +- tests/TemplateTest.php | 2 +- 10 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db6b765..2c5664c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest] - php-version: ['8.1', '8.2', '8.3'] + php-version: ['8.2', '8.3'] name: 'PHPUnit' steps: - name: Checkout @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1', '8.2', '8.3'] + php-version: ['8.2', '8.3'] name: 'Psalm' steps: - name: Checkout @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1'] + php-version: ['8.2'] name: 'CS' steps: - name: Checkout diff --git a/.gitignore b/.gitignore index e96516b..7330583 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ composer.lock vendor .phpunit.result.cache +.phpunit.cache diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1b64f36 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## [Unreleased] + +### Removed + +- Support for PHP `8.1` diff --git a/composer.json b/composer.json index 1ec2510..9798529 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "issues": "http://github.com/Innmind/UrlTemplate/issues" }, "require": { - "php": "~8.1", + "php": "~8.2", "innmind/url": "~4.1", "innmind/immutable": "~4.3" }, @@ -30,9 +30,9 @@ } }, "require-dev": { - "phpunit/phpunit": "~9.0", - "vimeo/psalm": "~4.4", - "innmind/black-box": "^4.16", + "phpunit/phpunit": "~10.2", + "vimeo/psalm": "~5.12", + "innmind/black-box": "~5.5", "innmind/coding-standard": "~2.0" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 51d31c5..034d8fd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,16 @@ - - + + + + + + + + + ./tests + + + . @@ -8,10 +18,5 @@ ./tests ./vendor - - - - ./tests - - + diff --git a/psalm.xml b/psalm.xml index 3240886..510148d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -2,6 +2,8 @@ + */ return Maybe::just($value) ->filter($expansion->matchesLimit(...)) ->map($expansion->clean(...)) diff --git a/tests/Expression/Level4/CompositeTest.php b/tests/Expression/Level4/CompositeTest.php index a57b5d9..b370291 100644 --- a/tests/Expression/Level4/CompositeTest.php +++ b/tests/Expression/Level4/CompositeTest.php @@ -167,7 +167,7 @@ public function testRegex() ); } - public function cases(): array + public static function cases(): array { return [ ['{var,hello}', 'value,Hello%20World%21'], diff --git a/tests/ExpressionsTest.php b/tests/ExpressionsTest.php index 0ffb298..8da5dd7 100644 --- a/tests/ExpressionsTest.php +++ b/tests/ExpressionsTest.php @@ -42,7 +42,7 @@ public function testReturnNothingWhenInvalidPattern() )); } - public function cases(): array + public static function cases(): array { return [ ['{foo}', Level4::class], diff --git a/tests/TemplateTest.php b/tests/TemplateTest.php index c70004b..0840cde 100644 --- a/tests/TemplateTest.php +++ b/tests/TemplateTest.php @@ -422,7 +422,7 @@ public function testNoNeedToEscapeSpecialRegexCharactersInTheUrl() $this->assertFalse($template->matches(Url::of('/f'))); } - public function cases(): array + public static function cases(): array { return [ ['http://example.com{/list*}{?keys*}', 'http://example.com/red/green/blue?semi=%3B&dot=.&comma=%2C'], From d99b657453319d941151899024bedee5816e7f2f Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 16 Sep 2023 18:45:50 +0200 Subject: [PATCH 3/3] add support for immutable 5 --- CHANGELOG.md | 6 +++++- composer.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b64f36..f14dced 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [Unreleased] +## 3.1.0 - 2023-09-16 + +### Added + +- Support for `innmind/immutable` `5` ### Removed diff --git a/composer.json b/composer.json index 9798529..30dc0b2 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": "~8.2", "innmind/url": "~4.1", - "innmind/immutable": "~4.3" + "innmind/immutable": "~4.3|~5.0" }, "autoload": { "psr-4": {