Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1373

Make old core document events official public API

$
0
0

Hi everyone,

@MichaelHamann recently brought my attention on the fact that I’m using in Change Request an internal event from oldcore: UserUpdatingDocumentEvent. And more generally I think we often use in extensions or custom code (or even advise to use here in the forum), the events that are available in xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/event at master · xwiki/xwiki-platform · GitHub.

For example I’m sure I already suggested people to use the XObjectUpdatedEvent without realizing it was internal. IMO we cannot consider those events are only internal: I’m pretty sure some of them are now used in lots of code outside of XS and modifying / removing that code would be quite a breaking change.

So my proposal here is to make official that all those events are public API. For doing that, we sadly don’t have much choice: as I said we cannot remove that code, which means we can’t refactor the package name as it would break extensions. Then the only choice seems to be to deprecate those events and re-create them with a new package.

wdyt?

15 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 1373

Trending Articles