Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release 3.4.1 into 3.5.x #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ All notable changes to this project will be documented in this file, in reverse

- Nothing.

## 4.0.0 - TBD
## 3.4.1 - 2020-11-19

### Release Notes for [3.4.1](https://github.com/laminas/laminas-router/milestone/4)

3.4.x bugfix release (patch)

### 3.4.1

- Total issues resolved: **1**
- Total pull requests resolved: **1**
- Total contributors: **2**

#### Bug

- [15: Cast to string when calling rawurlencode within Regex router](https://github.com/laminas/laminas-router/pull/15) thanks to @weierophinney and @matbech

## 3.4.0 - 2020-11-17

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions test/Http/RegexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public static function routeProvider()
null,
['bar' => 'bar', 'baz' => 'baz']
],
'params-contain-non-string-scalar-values' => [
new Regex('/id/(?<id>\d+)/scale/(?<scale>\d+\.\d+)', '/id/%id%/scale/%scale%'),
'/id/42/scale/4.2',
null,
['id' => 42, 'scale' => 4.2]
],
];
}

Expand Down