指南
- 介绍
- Contribute
- 部署
- 管理
- 高级
内部文档
扩展
- Main 核心概念
- 参考指南
- 进阶指南
- 更新指南
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
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.
提示If you need help applying these changes or using new features, please start a discussion on the community forum or Discord chat.
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 nameextend.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 theLaminas
namespace instead. See PR #1963. - The
Flarum\Util\Str::slug()
method has been deprecated. UseIlluminate\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
:- Returning a plain array of field names from the
availableSettings()
method is deprecated, but still supported. It must now return an array of field names mapping to their type. See the inline documentation for more details. - Implement the
validate()
method that will be required in beta.13. See its documentation. - Implement the
canSend()
method that will be required in beta.13. See its documentation.
- Returning a plain array of field names from the
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:
- The
flarum/components/Select
component now supports adisabled
prop. See PR #1978.
- The
Other changes / Recommendations
- The
TextFormatter
library has been updated to (at least) version 2.3.6. If you are using it (likely through our ownFlarum\Formatter\Formatter
class), we recommend scanning the library's changelog. - The JS
slug()
helper from theflarum/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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论