Skip to content

Commit

Permalink
Merge pull request #1016 from creative-commoners/pulls/4/deprecated
Browse files Browse the repository at this point in the history
API Update deprecations
  • Loading branch information
GuySartorelli authored Oct 24, 2022
2 parents a47adfe + 291057d commit 4374a69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Extensions/ElementalAreaUsedOnTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DNADesign\Elemental\Extensions;

use SilverStripe\Dev\Deprecation;
use SilverStripe\Admin\Forms\UsedOnTable;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\ORM\DataExtension;
Expand Down Expand Up @@ -31,10 +32,11 @@ public function updateUsageExcludedClasses(array &$excludedClasses)
* @var ArrayList $usage
* @var DataObject $record
* @see UsedOnTable::updateUsage
* @deprecated 4.5.0 Use self::updateUsageExcludedClasses instead
* @deprecated 4.5.0 Use updateUsageExcludedClasses() instead
*/
public function updateUsage(ArrayList &$usage, DataObject &$record)
{
Deprecation::notice('4.5.0', 'Use updateUsageExcludedClasses() instead');
// noop
}

Expand Down
9 changes: 7 additions & 2 deletions src/Search/ElementalSolrIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DNADesign\Elemental\Search;

use SilverStripe\Dev\Deprecation;
use Page;
use SilverStripe\FullTextSearch\Solr\SolrIndex;

Expand All @@ -13,11 +14,15 @@
* Provides ability to index Elemental content for a page, so it can be returned in the context of the page
* that the elements belong to
*
* @deprecated 4.2.0 This index will be removed from the default setup, use a custom index to replicate
* the functionality
* @deprecated 4.2.0 Use a custom index instead
*/
class ElementalSolrIndex extends SolrIndex
{
public function __construct()
{
Deprecation::notice('4.2.0', 'Use a custom index instead', Deprecation::SCOPE_CLASS);
}

public function init()
{
$this->addClass(Page::class);
Expand Down

0 comments on commit 4374a69

Please sign in to comment.