Skip to content

Conversation

@GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Nov 11, 2024

Needs silverstripe/silverstripe-framework#11461 for CI to go green - please merge that PR first.

This PR deprecates code that will be removed in #3022, and adds the new class_description config.

Note that there are a lot of methods in #3022 which are being removed from SiteTree but are being added to a superclass or to the Hierarchy extension in silverstripe/silverstripe-framework#11460. The Hierarchy extension is required to be on SiteTree for that class and CMSMain to work correctly, so the effect is that the methods are not removed from a downstream developer POV.
Downstream developers can still override the methods in subclasses and call parent::whatever() as though the method was directly implemented on SiteTree.

Issue

Comment on lines +139 to 141
* @deprecated 5.4.0 will be moved to SilverStripe\ORM\Hierarchy\Hierarchy->cache_allowedChildren
*/
protected static $_allowedChildren = [];
Copy link
Member Author

@GuySartorelli GuySartorelli Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really have a process for deprecating non-config properties - and this one is very unlikely to be used by downstream devs anyway. I won't mention it in the changelog unless asked to.

Comment on lines +26 to 29
/**
* @deprecated 5.4.0 use class_description instead.
*/
private static $description = 'Redirects requests to another location';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that while I have added the deprecation notice to subclasses to ensure notices are emitted appropriately, I will only mention the config on SiteTree being deprecated in the changelog.

@GuySartorelli GuySartorelli force-pushed the pulls/5/deprecation-sitetree1 branch from 78dadc2 to 32b21de Compare November 11, 2024 22:12
*
* @return string|null
*/
public function i18n_classDescription()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n_classDescription() is removed here but will now exist on a parent class, so no need to deprecate.

@emteknetnz emteknetnz merged commit 58a4ae5 into silverstripe:5 Nov 14, 2024
10 of 15 checks passed
@emteknetnz emteknetnz deleted the pulls/5/deprecation-sitetree1 branch November 14, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants