From 5048f28d5870618c125479b30b62f733bf273913 Mon Sep 17 00:00:00 2001 From: Laminas Bot Date: Tue, 17 Nov 2020 21:52:02 +0000 Subject: [PATCH 1/3] Bumps changelog version to 3.4.1 Updates the CHANGELOG.md file to add a changelog entry for a new 3.4.1 version. --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4312dec6..63bef895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.4.1 - TBD + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 4.0.0 - TBD ### Added From e5c1be4ec67f065dae22136fe3aedf7ec41da2e6 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 19 Nov 2020 12:12:46 -0600 Subject: [PATCH 2/3] fix: ensure we cast to string when calling `rawurlencode()` The `Regex` router, when assembling a URL, was not casting values to string when calling `rawurlencode()`, leading to a `TypeError` in PHP 8. [optional footerFixes #14 Signed-off-by: Matthew Weier O'Phinney --- src/Http/Regex.php | 2 +- test/Http/RegexTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Http/Regex.php b/src/Http/Regex.php index c99502bc..4d5cf79b 100644 --- a/src/Http/Regex.php +++ b/src/Http/Regex.php @@ -155,7 +155,7 @@ public function assemble(array $params = [], array $options = []) $spec = '%' . $key . '%'; if (strpos($url, $spec) !== false) { - $url = str_replace($spec, rawurlencode($value), $url); + $url = str_replace($spec, rawurlencode((string) $value), $url); $this->assembledParams[] = $key; } diff --git a/test/Http/RegexTest.php b/test/Http/RegexTest.php index 3bc6daa1..360196b3 100644 --- a/test/Http/RegexTest.php +++ b/test/Http/RegexTest.php @@ -64,6 +64,12 @@ public static function routeProvider() null, ['bar' => 'bar', 'baz' => 'baz'] ], + 'params-contain-non-string-scalar-values' => [ + new Regex('/id/(?\d+)/scale/(?\d+\.\d+)', '/id/%id%/scale/%scale%'), + '/id/42/scale/4.2', + null, + ['id' => 42, 'scale' => 4.2] + ], ]; } From 338e55010c9090d7a79c6e6aed68b886b849801f Mon Sep 17 00:00:00 2001 From: Laminas Bot Date: Thu, 19 Nov 2020 19:42:10 +0000 Subject: [PATCH 3/3] 3.4.1 readiness Updates the CHANGELOG.md to set the release date. --- CHANGELOG.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63bef895..0e66c226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,27 +2,24 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 3.4.1 - TBD +## 3.4.1 - 2020-11-19 -### Added - -- Nothing. -### Changed - -- Nothing. +----- -### Deprecated +### Release Notes for [3.4.1](https://github.com/laminas/laminas-router/milestone/4) -- Nothing. +3.4.x bugfix release (patch) -### Removed +### 3.4.1 -- Nothing. +- Total issues resolved: **1** +- Total pull requests resolved: **1** +- Total contributors: **2** -### Fixed +#### Bug -- Nothing. + - [15: Cast to string when calling rawurlencode within Regex router](https://github.com/laminas/laminas-router/pull/15) thanks to @weierophinney and @matbech ## 4.0.0 - TBD