Skip to content

Commit a0bfba6

Browse files
committed
URI-1.75
- $uri->canonical unconditionally returns a clone (GH#58) (Dorian Taylor)
1 parent 8b2f756 commit a0bfba6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Changes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Revision history for URI
22

3-
{{$NEXT}}
3+
1.75 2019-01-08 19:45:38Z
44
- $uri->canonical unconditionally returns a clone (GH#58) (Dorian Taylor)
55

66
1.74 2018-04-22 12:30:44Z

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,12 @@ The common methods available for all URI are:
205205
uppercasing all escape sequences, and unescaping octets that can be
206206
better represented as plain characters.
207207

208-
For efficiency reasons, if the $uri is already in normalized form,
209-
then a reference to it is returned instead of a copy.
208+
Before version 1.75, this method would return the original unchanged
209+
`$uri` object if it detected nothing to change. To make the return
210+
value consistent (and since the efficiency gains from this behaviour
211+
were marginal), this method now unconditionally returns a clone. This
212+
means idioms like `$uri->clone->canonical` are no longer
213+
necessary.
210214

211215
- $uri->eq( $other\_uri )
212216
- URI::eq( $first\_uri, $other\_uri )

0 commit comments

Comments
 (0)