Closed mspacemedia closed 5 years ago
Deprecating APIs is fine, but if we are still using them then we need to fix it
Well, that's true but it gets called by the framework in 3.6.6 here: ViewableData->__get(DocumentSets)
Not quite sure how one would go about fixing this issue to be honest.
That's not really where it gets called. it's either called like this: $obj->DocumentSets
or in a template as $DocumentSets
. Do you have the full stacktrace?
Error:
Don't use
getDocumentSets
Do useDocumentSets
Stacktrace: does reference DocumentSets (sans 'get' prefix)
ViewableData->__get(DocumentSets)
Problem: get{$thatThing}
is the first check to call
https://github.com/silverstripe/silverstripe-framework/blob/3.6.6/view/ViewableData.php#L119
Relevant: deprecation added as resolution of 500 server error. https://github.com/silverstripe/silverstripe-dms/pull/206#discussion_r179969551
To be honest, this was a mistake on our part in using the getter originally, then being asked to stop using so deprecating it for the sake of not breaking semantic versioning by removing it completely. I guess we need to just remove it altogether and break it for sake of it.
There is no version 3 at current, so besides the reasonably trivial nature of the change, I don't see the cause for resistance to a new major version.
Unfortunately, SilverStripe 3 has entered limited support in June 2018. This means we'll only be fixing critical bugs and security issues for SilverStripe 3 going forward.
You can read the SilverStripe Roadmap for more information on our support commitments.
I'm sure you all know, but the current version produces this error when viewing a page in the sitetree under 3.6.6 under dev conditions.
[User Deprecated] DMSSiteTreeExtension->getDocumentSets is deprecated. Use DocumentSets() instead. Called from call_user_func_array.