Introduce 'clone' flag for newFromLinkTarget.
authordaniel <dkinzler@wikimedia.org>
Wed, 3 Apr 2019 08:47:57 +0000 (10:47 +0200)
committerdaniel <dkinzler@wikimedia.org>
Fri, 5 Apr 2019 14:52:06 +0000 (16:52 +0200)
commit2d721e69e885fb7ee6afbe9bd87d30972a00efd3
treec9ad31428d61be8148847bfe2a60693fd7ee7d91
parent043135adb0ed3dce71319807ed9ae0cc3ce914ee
Introduce 'clone' flag for newFromLinkTarget.

The "new" part of some of the newXXX pseudo-constructors
in the Title class is a lie: these methods do not always
return a new instance. This patch ensures that this fact is
documented, and we have a safe way to get a fresh Title
from a LinkTarget.

Needed by I94479b44afb30

Change-Id: I4d561ef7d7447d3d6e35079cf656bd564882d25e
includes/Title.php
tests/phpunit/includes/TitleTest.php