Today we're proud to announce the release of Flarum 0.1.0-beta.8.
This is a huge release. It contains some massive behind-the-scenes changes which will make Flarum more reliable and streamline extension development going forward. There are also a few nifty new features, and plenty of bug fixes.
π Improved Search
Search has received a makeover. Discussion titles are now searched and results are ranked much more reliably. Search performance issues on large forums have been fixed. Search results have been redesigned making it easier to find what you're looking for.
βοΈ Formatting Buttons
Markdown fans rejoice! You can now format your posts with the click of a button (or the press of a keyboard shortcut). The text editor has been beefed up with automatic insertion of list items and indentation. There are also buttons to insert emoji and mentions to make these features more discoverable.
π Admin Dashboard
Work has begun on a proper admin dashboard, featuring some basic status information and a framework for customizable widgets. Although you can't yet customize the widget layout, extensions may add them. A Statistics widget is currently under development.
π And More!
- Infinite scrolling of the notifications list lets you view more than just the ten most recent notifications.
- Drag and drop avatar upload thanks to @josephnle.
- Better emoji support with Twemoji instead of Emoji One.
- Redesigned error and Reset Password pages to keep your Flarum forum looking snazzy.
- A new layout for the Extensions page thanks to @DogSports, @ardacebi, and @datitisev.
- Custom footer HTML can be set just like custom header HTML.
- Font Awesome 5 provides some beautiful new icons for Flarum's interface.
- Open Sans has been removed as Flarum's default font β we now use the default system font.
- A minor security fix thanks to responsible disclosure from B. Dhiyaneshwaran of Geek Freak.
These are just some of the highlights of beta 8. There are tons of other minor features, polish, bug fixes, and performance improvements β see the full changelog for all the nitty-gritty!
For Developers
All these features and improvements are great. But perhaps the most impressive part of beta 8 is what's gone on behind the scenes. The development team has worked tirelessly to completely overhaul Flarum's codebase, making it more reliable, secure, maintainable, and extensible. In overview:
- PHP namespaces have been restructured in a more logical manner.
- Database columns and JSON-API attributes have been renamed to conform to a convention.
- An all-new PHP Extension API makes writing extensions faster and easier.
- Webpack for JavaScript compilation is faster, more powerful, and generates sourcemaps.
- Various major refactorings and new APIs, including the application bootstrapping process, frontend/asset compilation pipeline, model visibility scoping, user display names, and third-party login providers.
π¨ New Extension API
The new PHP Extension API is really nifty. We won't go into full detail here, butΒ here's a taste of how easy it is to do some basic tasks like adding assets and routes, all from the bootstrap file:
// your-extension/extend.php
use Flarum\Extend;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less')
->route('/tags', 'tags'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less'),
(new Extend\Routes('api'))
->get('/tags', 'tags.index', Controller\ListTagsController::class)
];
The API is incomplete and still a work-in-progress βΒ there's a lot you can't yet achieve with it. But most of your beta 7 extension code will remain compatible, so you can transition your extensions over to the new API progressively as it's released in beta 9 and beyond.
We're also planning a similar overhaul on the JavaScript side of the Extension API βΒ stay tuned for more in beta 9.
For step-by-step instructions on how to update your extensions for beta 8, see this doc. Or, to get familiar with the new API, check out the updated extension docs.
π¨βπ¬ Site extend.php
Want to have a play with the new extenders, or just make some quick customizations to your forum without having to scaffold a whole new extension? The new extend.php
included in the Flarum skeleton is the perfect way to do this. Just open it up, put your extenders in, and fire 'em up.
Upgrading
Alright, time to upgrade! But before you do, a few warnings:
π Flarum is beta software. You shouldn't be using it in production unless you know what you're doing. This upgrade involves getting your hands dirty. π¨βπ§ Things might go wrong. π₯ While we'll try our best to support you, remember the warning you read before you installed Flarum, and be prepared to take responsibility if you chose to ignore it. There are a few things you can do to ensure the upgrade goes as smoothly as possible:
Back up your data β both your files and your database. If something goes wrong and you have a backup to restore from, you'll be glad you did.
Do not upgrade a production forum. If you are running Flarum in production, perform the upgrade in a local development environment first so you can make sure you know what you're doing, before you think about touching your live one.
Be patient with those who are trying to help you. We know that it can be frustrating, but you're going to have much more success in getting help if you're pleasant and patient with your support.
β οΈ Beta 8 requires PHP 7.1 and MySQL 5.6. Make sure your server is running modern versions before you upgrade.
β οΈ Beta 8 breaks compatibility with third-party extensions. You must disable all third-party extensions before upgrading. For a list of extensions that have been updated for beta 8, see here.
β οΈ Beta 8 removes the user bio feature. While there is currently no drop-in replacement for this, bio data will remain in the database so it can still be accessed when there is a replacement.
Happy? Let's get started.
1οΈβ£ Disable Third-Party Extensions
As the warning states above, beta 8 breaks compatibility with third-party extensions. You'll need to disable third-party extensions before you proceed, otherwise things could go awry during the upgrade process.
2οΈβ£ Update Your Skeleton
The "skeleton" refers to all of the directories and files other than the vendor
directory (which is where Flarum's source code lives). There have been a few changes in beta 8:
- The biggest change is that all public files (
assets
, .htaccess
, index.php
) have been moved into a new public
directory. This drastically increases security by moving sensitive source code files outside of the web root.
admin.php
and api.php
have been removed.
- The contents of
flarum
and index.php
have been updated.
- There is a new
extend.php
file.
- There are new
storage/locale
and storage/sessions
directories.
- The
flarum-ext-
prefix has been removed from all extension Composer package names. flarum/flarum-ext-english
is now flarum/lang-english
.
- A
.nginx.conf
file has been added. For convenience, this can be included into your server's configuration block.
The recommended way to update your skeleton is to start from scratch:
- Make a backup or move your existing Flarum installation into a different directory.
- Follow the steps in the installation guide to set up a fresh Flarum skeleton.
- Copy over the following files from your old Flarum installation:
config.php
assets
(copy into your public
directory)
- Keep the new
composer.json
file provided with the fresh skeleton for now. You can selectively re-install your third-party extensions after the next step is complete.
3οΈβ£ Update Flarum
This is where the magic happens β¨. These commands may take a few minutes to run β especially if you're running a big forum. Sit tight!
composer update
php flarum migrate
php flarum cache:clear
Now close your eyes π, cross your fingers π€, and reload your sparkly new Beta 8 forum.
4οΈβ£ Tie Up Loose Ends
- If icons aren't displaying correctly, you'll need to copy all files in
vendor/components/font-awesome/webfonts/
to public/assets/fonts/
.
- Since the flarum-english extension has been renamed to flarum-lang-english, you'll need to re-enable it from the admin panel.
- You'll need to selectively re-install any third-party extensions you were using, but make sure they have been updated for beta 8 before you do.
- There is a new delete posts permission. By default it is granted to Moderators, but if you have any custom groups set up, you may need to adjust this.
- There are some CSS changes, so if you're using any custom CSS or LESS it may need some tweaking.
- With Font Awesome 5, icon class names have changed β you may need to update your groups.
Start a new discussion in the Support tag if you're having trouble at any point βΒ we're here to help!
What's Next?
We're all gonna kick back with a cold beverage or two and have a bit of a rest, that's what's next. ππ»
Just kidding. We're jumping right into beta 9 development! Following along the roadmap towards a stable version of 0.1, beta 9 will bring:
- Continued expansion of the new Extension API withΒ more Extenders and a similar overhaul on the JS side
- More refactoring and code cleanup
- Some design and UX tweaks
I know what you're thinking... Beta 8 took over a year to release. When can I expect Beta 9? The good news is that with all of the major, large-scale, break-everything changes out of the way, smaller incremental releases will now be possible. We're aiming to have Beta 9 out in months (that's as precise as we can get π).
Thank You
Wow, what a release announcement. I'd like to wrap up by thanking everyone who has made this release possible. Thank you...
To @Franz and @luceos for their incredible work pushing these massive changes forward.
To all of the others who have contributed code to this release: @sijad, @datitisev, @clarkwinkelmann, @Davis, @Kyrne, @michaeldalyuk, @ar7n, @DogSports, @gwillem, @markv, @ardacebi, @afrastgeek, @johannsa, @cljk, @josephnle, @zinsserzh, and anyone else who I've missed.
To our moderators @jordanjay29, @Prosperous, @Digital, and @Pollux who keep the community thriving, and @Arkinn, @datitisev, @OrdinaryJellyfish, and @Kyrne for their work on the docs.
To all of our Patrons and Open Collective supporters. A special mention to bokt.nl, osTicket, Jordan Heinz, Sebastian, and Glowing Blue AG who have all pledged to give over $20 per month.
And finally, to you for your ongoing support and enthusiasm that keeps us all going.