# Updating For Beta 12

Beta 12 packs several new features for extension developers, but also continues our cleanup efforts which results in a few changes, so please read this guide carefully to find out whether your extensions are affected. We invested extra effort to introduce new functionality in a backward-compatible manner or first deprecate functionality before it will be removed in the next release, in line with our versioning recommendations.

TIP

If you need help applying these changes or using new features, please start a discussion on the community forum (opens new window) or Discord chat (opens new window).

# Deprecations / Upcoming breaking changes

  • Reminder: In previous versions of Flarum, an extensions' main file was named bootstrap.php. This name will no longer be supported in the stable 0.1 release. Make sure your extension uses the name extend.php.
  • PHP 7.1 support will be dropped in beta.13.
  • Using library classes from the Zend namespace is now deprecated and will be removed in beta.13. Use the Laminas namespace instead. See PR #1963 (opens new window).
  • The Flarum\Util\Str::slug() method has been deprecated. Use Illuminate\Support\Str::slug() instead.
  • The Flarum\Event\ConfigureMiddleware has been deprecated. We finally have a proper replacement - see "New Features" below. Therefore, it will be removed in beta.13.
  • If you implement the Flarum\Mail\DriverInterface:

# New Features

  • New PHP extenders:
    • Flarum\Extend\Middleware offers methods for adding, removing or replacing middleware in our three middleware stacks (api, forum, admin). We also added documentation for this feature.
    • Flarum\Extend\ErrorHandling lets you configure status codes and other aspects of our error handling stack depending on error types or exception classes.
  • JavaScript:

# Other changes / Recommendations

  • The TextFormatter library has been updated to (at least) version 2.3.6. If you are using it (likely through our own Flarum\Formatter\Formatter class), we recommend scanning the library's changelog (opens new window).
  • The JS slug() helper from the flarum/utils/string module should only be used to suggest slugs to users, not enforce them. It does not employ any sophisticated transliteration logic like its PHP counterpart.