Skip to content

Commit d4e7426

Browse files
committed
docs: add changelog and upgrading guide
1 parent 5a3ac57 commit d4e7426

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

user_guide_src/source/changelogs/v4.4.0.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ BREAKING
2020
Behavior 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+
2332
Interface Changes
2433
=================
2534

user_guide_src/source/installation/upgrade_440.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ Please refer to the upgrade instructions corresponding to your installation meth
1515
Breaking 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+
1831
Mandatory File Changes
1932
**********************
2033

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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

0 commit comments

Comments
 (0)