-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH Remove code that had been retained for backwards compatibility #1883
ENH Remove code that had been retained for backwards compatibility #1883
Conversation
// pass in a single icon (retain backwards compatibility) | ||
icon: PropTypes.shape({ | ||
nodeName: PropTypes.string, | ||
className: PropTypes.string, | ||
onClick: PropTypes.func, | ||
action: (props) => { if (props.action) { throw new Error('action: no longer used'); } }, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't used anywhere that I can find - and if anyone's using it for their own uses they can just pass it as an array to the icons
prop instead.
// these two functions retained for backwards compatibility | ||
showList: function(instant) { | ||
this.showGroupsList(instant); | ||
this.showMembersList(instant); | ||
}, | ||
hideList: function(instant) { | ||
this.hideGroupsList(instant); | ||
this.hideMembersList(instant); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were only kept in case someone was calling them directly in their own code. See #1531 (review)
Now that we're doing a major release, we can remove these unnecessary functions.
// | ||
// Example: protected function updateUsage(ArrayList &$usage, DataObject &$record) | ||
// $dataObjects = $usage->exclude('ClassName', MyDataObject::class); | ||
$this->extend('updateUsage', $usage, $record); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used in any core or supported modules
/* src/jquery.entwine.legacy.js */ | ||
|
||
(function($) { | ||
|
||
// Adds back concrete methods for backwards compatibility | ||
$.concrete = $.entwine; | ||
$.fn.concrete = $.fn.entwine; | ||
$.fn.concreteData = $.fn.entwineData; | ||
|
||
// Use addHandler to hack in the namespace.$.concrete equivilent to the namespace.$.entwine namespace-injection | ||
$.entwine.Namespace.addHandler({ | ||
order: 100, | ||
on: function(selector, k, v) { return false; }, | ||
|
||
namespaceMethodOverrides: function(namespace){ | ||
namespace.$.concrete = namespace.$.entwine; | ||
namespace.injectee.concrete = namespace.injectee.entwine; | ||
namespace.injectee.concreteData = namespace.injectee.entwineData; | ||
return {}; | ||
} | ||
}); | ||
|
||
})(jQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concrete
was a very very very very very old way of invoking entwine. There's virtually 0 chance anyone is using it.
I don't think anything here needs to be mentioned in the changelog but happy to add if someone disagrees. |
We don't need to retain this compatibility anymore. Some of this is dead code, and some is just tech debt that should have been properly deprecated.
Issue