From: Thalia Date: Wed, 27 Mar 2019 16:36:30 +0000 (+0000) Subject: Deprecate Block::isValid method X-Git-Tag: 1.34.0-rc.0~2292^2 X-Git-Url: http://git.cyclocoop.org/data/%7BGarradin/WEBSITE%7D?a=commitdiff_plain;h=cce24b40787a3d0aabbadeae664d03c3f814e259;p=lhc%2Fweb%2Fwiklou.git Deprecate Block::isValid method Block::isValid checks whether the block target equals null. It seems to have been unused since commit 40a926ab2c566052eefd08c36f246d6b5321afc5. It was called from Block::newFromDB, which was removed in favour of Block::newFromTarget, which has its own logic for checking the target. Since the method is public, it should be deprecated before removal. Change-Id: Ibcfb377a382f55e80933836960be7e3589908390 --- diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 72a468b0a0..a93cd3d268 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -404,6 +404,7 @@ because of Phabricator reports. * ManualLogEntry::setTags() is deprecated, use ManualLogEntry::addTags() instead. The setTags() method was overriding the tags, addTags() doesn't override, only adds new tags. +* Block::isValid is deprecated, since it is no longer needed in core. === Other changes in 1.33 === * (T201747) Html::openElement() warns if given an element name with a space diff --git a/includes/Block.php b/includes/Block.php index 060eebd703..46e8124c01 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -964,9 +964,12 @@ class Block { /** * Is the block address valid (i.e. not a null string?) + * + * @deprecated since 1.33 No longer needed in core. * @return bool */ public function isValid() { + wfDeprecated( __METHOD__, '1.33' ); return $this->getTarget() != null; }