Dear extension developers,
As you may know, the main reason why Flarum is still in beta despite being quite usable is the need for several changes to stabilize the extension API. Most notably:
The former of these was done in beta 14. The latter was started in beta 8, and we've been gradually converting event-based extension entrypoints to extenders. This process will be completed in beta 16: the remaining extensibility events will be deprecated, and extender successors introduced (note that only hacky extensibility events are going away; meaningful events like Saving are here to stay).
As part of this, the Compat
legacy extender from pre-beta 8 is going away. This means that callback functions that execute arbitrary logic (example) during extension boot will no longer work. This nearly eliminates the issue of early binding resolutions, but requires extensions using it to update.
For the vast majority of cases (anything that uses that callback to subscribe/listen to events), there now exists an equivalent extender that should be used instead. If the events you're listening/subscribing to are domain events (e.g. Saving), you can use a new dedicated Event
extender.
One type of functionality for which the extender replacement isn't obvious is container bindings (e.g. flarum/pusher). This can be done with via the service provider extender (e.g. a newer version of flarum/pusher).
If you are unsure about which extenders should be used to replace your use of callbacks in extend.php
, or are not sure that such an extender exists, please comment so below or reach out! We're in the final stages of finishing up the extender API, so now is the time to comment.
Beyond this, we want to reach out to our incredible community of extension developers, and ask how we can make Flarum extension development better for you. Any feedback is appreciated, but should focus on extensibility, not new features you want to see in Flarum (that’s a matter for another time 😀). For instance:
- What have you struggled with / found difficult when trying to extend Flarum?
- If you’ve written multiple extensions, have you found yourself duplicating boilerplate code between them?
- What other backend extenders would you like to see implemented in the future?
- Are there any parts of Flarum you find confusing (please be specific), and would like better documentation for? We've significantly expanded our extension documentation over the past few releases, and plan on continuing to do so (for instance, an "examples" section in the extend docs).
- What kind of development tooling would you like to see? We're planning automated testing libraries, frontend typings, and an updated extension generator, but would love to hear your input.
Thank you for being a part of Flarum!