Merge pull request #75 from creative-commoners/pulls/2/depr-messages

API Update deprecations
This commit is contained in:
Guy Sartorelli 2022-11-21 10:00:28 +13:00 committed by GitHub
commit 8041c15dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
namespace SilverStripe\VersionFeed; namespace SilverStripe\VersionFeed;
use SilverStripe\Dev\Deprecation;
use SilverStripe\CMS\Model\SiteTreeExtension; use SilverStripe\CMS\Model\SiteTreeExtension;
use SilverStripe\Core\Config\Config; use SilverStripe\Core\Config\Config;
use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\CheckboxField;
@ -171,7 +172,7 @@ class VersionFeed extends SiteTreeExtension
/** /**
* Compile a list of changes to the current page, excluding non-published and explicitly secured versions. * Compile a list of changes to the current page, excluding non-published and explicitly secured versions.
* *
* @deprecated 2.0.0 Use VersionFeed::getDiffList instead * @deprecated 2.0.0 Use VersionFeed::getDiffList() instead
* *
* @param int $highestVersion Top version number to consider. * @param int $highestVersion Top version number to consider.
* @param boolean $fullHistory Set to true to get the full change history, set to false for a single diff. * @param boolean $fullHistory Set to true to get the full change history, set to false for a single diff.
@ -181,6 +182,7 @@ class VersionFeed extends SiteTreeExtension
*/ */
public function getDiffedChanges($highestVersion = null, $fullHistory = true, $limit = 100) public function getDiffedChanges($highestVersion = null, $fullHistory = true, $limit = 100)
{ {
Deprecation::notice('2.0.0', 'Use VersionFeed::getDiffList() instead');
return $this->getDiffList( return $this->getDiffList(
$highestVersion, $highestVersion,
$fullHistory ? $limit : 1 $fullHistory ? $limit : 1