File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v3.0.1 - 2022-06-28
4
+
5
+ - Fix a bug where asterisk characters were not supported in request url's
6
+
3
7
## v3.0.0 - 2021-10-01
4
8
5
9
- Request: Add ability to add custom query parameters to requests
Original file line number Diff line number Diff line change 7
7
#[\Attribute(\Attribute::TARGET_PROPERTY )]
8
8
class Id
9
9
{
10
-
11
10
}
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function __construct(
82
82
private function parseUriPath (string $ path ): void
83
83
{
84
84
preg_match (
85
- '/^(([a-zA-Z0-9_\-.\/]+.php)(\/)|)( ' . $ this ->apiPrefix . ')([\/a-zA-Z0-9_\-.]+)$/ ' ,
85
+ '/^(([a-zA-Z0-9_\-.\/]+.php)(\/)|)( ' . $ this ->apiPrefix . ')([\/a-zA-Z0-9_\-* .]+)$/ ' ,
86
86
trim ($ path , '/ ' ),
87
87
$ matches
88
88
);
Original file line number Diff line number Diff line change @@ -339,4 +339,16 @@ public function testCustomQueryParameters(): void
339
339
self ::assertArrayHasKey ($ queryKey , $ requestQuery );
340
340
self ::assertEquals ($ queryValue , $ requestQuery [$ queryKey ]);
341
341
}
342
+
343
+ public function testUrlWithAsteriskCharacter (): void
344
+ {
345
+ $ request = new Request (
346
+ 'GET ' ,
347
+ new Uri ('/index.php/api/examples/*.example-1 ' ),
348
+ null ,
349
+ 'api '
350
+ );
351
+
352
+ self ::assertEquals ('*.example-1 ' , $ request ->id ());
353
+ }
342
354
}
You can’t perform that action at this time.
0 commit comments