File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ BREAKING
2020Behavior Changes
2121================
2222
23+ URI::setSegment() and Non-Existent Segment
24+ ------------------------------------------
25+
26+ An exception is now thrown when you set the last ``+2 `` segment.
27+ In previous versions, an exception was thrown only if the last segment ``+3 ``
28+ or more was specified. See :ref: `upgrade-440-uri-setsegment `.
29+
30+ The next segment (``+1 ``) of the current last segment can be set as before.
31+
2332Interface Changes
2433=================
2534
Original file line number Diff line number Diff line change @@ -15,6 +15,19 @@ Please refer to the upgrade instructions corresponding to your installation meth
1515Breaking Changes
1616****************
1717
18+ .. _upgrade-440-uri-setsegment :
19+
20+ URI::setSegment() Change
21+ ========================
22+
23+ Dut to a bug, in previous versions an exception was not thrown if the last segment
24+ ``+2 `` was specified. This bug has been fixed.
25+
26+ If your code depends on this bug, fix the segment number.
27+
28+ .. literalinclude :: upgrade_440/002.php
29+ :lines: 2-
30+
1831Mandatory File Changes
1932**********************
2033
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // URI: http://example.com/one/two
4+
5+ // Before:
6+ $ uri ->setSegment (4 , 'three ' );
7+ // The URI will be http://example.com/one/two/three
8+
9+ // After:
10+ $ uri ->setSegment (4 , 'three ' ); // Will throw Exception
11+ $ uri ->setSegment (3 , 'three ' );
12+ // The URI will be http://example.com/one/two/three
You can’t perform that action at this time.
0 commit comments