2023-05-03 11:55:00 +02:00
Module Migration Guide
======================
2024-07-24 17:06:25 +02:00
Version 1.17 (Unreleased)
-------------------------
### Behaviour change
- Forms in modal box no longer have focus automatically on the first field. [The `autofocus` attribute ](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/autofocus ) is now required on the field. More info: [#7136 ](https://github.com/humhub/humhub/issues/7136 )
2024-12-12 11:01:13 +00:00
- The new "Manage All Content" Group Permission allows managing all content (view, edit, move, archive, pin, etc.) even if the user is not a super administrator. It is disabled by default. It can be enabled via the configuration file, using the `\humhub\modules\admin\Module::$enableManageAllContentPermission` option.
- Users allowed to "Manage Users" can no longer move all content: they need to be allowed to "Manage All Content".
2023-05-03 11:55:00 +02:00
2024-10-20 18:33:44 +05:30
### New
- CSS variables: `--hh-fixed-header-height` and `--hh-fixed-footer-height` (see [#7131 ](https://github.com/humhub/humhub/issues/7131 )): these variables should be added to custom themes in the `variables.less` file to overwrite the fixed header (e.g. the top menu + margins) and footer heights with the ones of the custom theme.
- `\humhub\modules\user\Module::enableRegistrationFormCaptcha` which is true by default (can be disabled via [file configuration ](https://docs.humhub.org/docs/admin/advanced-configuration#module-configurations ))
2024-12-11 15:23:41 +00:00
- `\humhub\modules\user\Module::$passwordHint` (see [#5423 ](https://github.com/humhub/humhub/issues/5423 ))
2024-12-17 10:36:23 +00:00
- New methods in the `DeviceDetectorHelper` class: `isMobile()` , `isTablet()` , `getBodyClasses()` , `isMultiInstanceApp()` and `appOpenerState()`
- HTML classes about the current device (see list in `DeviceDetectorHelper::getBodyClasses()` )
2024-09-09 11:08:17 +02:00
2024-10-21 15:48:57 +03:00
### Deprecated
2024-12-11 15:23:41 +00:00
- `\humhub\modules\ui\menu\MenuEntry::isActiveState()` use `\humhub\helpers\ControllerHelper::isActivePath()` instead
2024-12-12 11:01:13 +00:00
- `\humhub\modules\content\Module::$adminCanViewAllContent` and `\humhub\modules\content\Module::adminCanEditAllContent` use `\humhub\modules\admin\Module::$enableManageAllContentPermission` instead which enables the "Manage All Content" Group Permission
2024-12-11 15:23:41 +00:00
- `\humhub\modules\user\models\User::canViewAllContent()` use `\humhub\modules\user\models\User::canManageAllContent()` instead
2024-10-21 15:48:57 +03:00
2024-10-20 18:33:44 +05:30
### Removed
- `Include captcha in registration form` checkbox removed from "Administration" -> "Users" -> "Settings"
2024-12-11 15:23:41 +00:00
- Removed obsolete property `\humhub\modules\content\widgets\richtext\AbstractRichText::$record`
2024-09-26 12:48:44 +04:00
- Removed `\humhub\widgets\ShowMorePager` widget
2024-09-09 11:08:17 +02:00
2024-04-03 17:09:45 +02:00
Version 1.16 (April 2024)
2023-09-25 16:17:01 +02:00
-------------------------
2024-02-09 09:54:55 +01:00
At least PHP 8.0 is required with this version.
2023-09-25 16:17:01 +02:00
2024-10-20 18:33:44 +05:30
### Removed
2024-07-24 17:06:25 +02:00
- `\humhub\modules\search\*` The existing search module was removed and the related features merged into the 'content', 'user' and 'space' modules.
2024-05-18 11:07:14 +02:00
- `\humhub\modules\user\models\User::getSearchAttributes()` and `\humhub\modules\space\models\Space::getSearchAttributes()`
2024-03-28 11:06:31 +01:00
### Behaviour change
2024-04-08 17:05:18 +02:00
- New Meta Search API
2024-04-03 17:09:45 +02:00
- Controller route change: `/search/mentioning` -> `/user/mentioning`
2024-04-04 14:28:08 +02:00
- `Yii::$app->search()` component is not longer available.
2024-04-08 17:05:18 +02:00
- Use `(new ContentSearchService($exampleContent->content))->update();` instead of `Yii::$app->search->update($exampleContent);`
2024-05-02 04:26:26 -04:00
- The method `setCellValueByColumnAndRow()` has been replaced with `setCellValue()` and `setValueExplicit()` .
- When rendering xlsx generated data cells, use the `setCellValue()` method with the appropriate coordinate obtained using `getColumnLetter()` .
2024-10-20 15:55:16 +03:00
- Switch `Module::$resourcesPath` to `resources`
2024-03-28 11:06:31 +01:00
2023-09-25 16:17:01 +02:00
### Deprecations
2024-01-17 15:19:25 +01:00
- `\humhub\components\Module::getIsActivated()` use `getIsEnabled()` instead
2024-07-24 17:06:25 +02:00
(note: this also affects the virtual instance property `\humhub\modules\friendship\Module::$isActivated` which should now read `$isEnabled` !)
2023-12-15 18:30:35 +01:00
- `\humhub\components\Module::migrate()` use `getMigrationService()->migrateUp(MigrationService::ACTION_MIGRATE)` instead
- `\humhub\libs\BaseSettingsManager::isDatabaseInstalled()` use `Yii::$app->isDatabaseInstalled()` instead
- `\humhub\models\Setting::isInstalled()` use `Yii::$app->isInstalled()` instead
- `\humhub\modules\content\components\ContentAddonActiveRecord::canRead()` use `canView()` instead
2023-09-25 16:17:01 +02:00
- `\humhub\modules\content\components\ContentAddonActiveRecord::canWrite()`
2023-11-22 16:01:55 +01:00
- `\humhub\modules\file\models\File::canRead()` use `canView()` instead
2024-01-17 15:19:25 +01:00
- `\humhub\modules\friendship\Module::getIsEnabled()` use `isFriendshipEnabled()` instead
2024-07-24 17:06:25 +02:00
(note: `\humhub\modules\friendship\Module::getIsEnabled()` and the virtual property `\humhub\modules\friendship\Module::isEnabled` now return the status of the module - which yields always true for core modules.)
2024-01-17 15:19:25 +01:00
- `\humhub\modules\marketplace\Module::isEnabled()` use `isMarketplaceEnabled()` instead
- `\humhub\modules\marketplace\services\ModuleService::activate()` use `enable()` instead
2023-09-25 16:17:01 +02:00
2024-04-08 17:05:18 +02:00
### New
- `humhub\modules\stream\actions\GlobalContentStream`
- `humhub\modules\stream\models\GlobalContentStreamQuery`
- `humhub\modules\stream\models\filters\GlobalContentStreamFilter`
2024-05-02 04:26:26 -04:00
- A new protected function `SpreadsheetExport::getColumnLetter()` has been introduced to get the column letter based on the column index.
2024-04-08 17:05:18 +02:00
2023-09-25 16:17:01 +02:00
### Type restrictions
2023-12-11 15:27:11 +01:00
- `\humhub\commands\MigrateController` enforces types on fields, method parameters, & return types
2023-12-18 12:02:53 +01:00
- `\humhub\components\behaviors\PolymorphicRelation` enforces types on fields, method parameters, & return types
- `\humhub\components\bootstrap\ModuleAutoLoader::findModules()` is enforcing types on method parameters and return value
2023-12-18 14:27:50 +01:00
- `\humhub\components\bootstrap\ModuleAutoLoader::findModulesByPath()` is enforcing types on method parameters and return value
2023-12-18 12:02:53 +01:00
- `\humhub\components\bootstrap\ModuleAutoLoader::locateModules()` is enforcing return type
- `\humhub\components\ModuleManager::register()` is enforcing types on method parameters
2023-09-25 16:17:01 +02:00
- `\humhub\modules\comment\models\Comment` on `canDelete()`
2023-11-22 16:01:55 +01:00
- `\humhub\modules\content\components\ContentAddonActiveRecord` on `canDelete()` , `canWrite()` , `canEdit()`
2023-09-25 16:17:01 +02:00
- `\humhub\modules\content\models\Content` on `canEdit()` , `canView()`
- `\humhub\modules\file\models\File` on `canRead()` , `canDelete()`
2023-12-20 10:36:11 +01:00
### Bugfix with potential side-effect
- `\humhub\modules\ui\form\widgets\BasePicker` and `\humhub\modules\ui\form\widgets\MultiSelect` do now treat and empty array for the field `BasePicker::$selection` as a valid selection list and will not attempt to get the list from the model in that case.
2023-09-25 16:17:01 +02:00
2023-11-06 18:57:17 +01:00
Version 1.15
2023-05-03 11:55:00 +02:00
-------------------------
### Behaviour change
2024-07-24 17:06:25 +02:00
- `\humhub\libs\BaseSettingsManager::deleteAll()` no longer uses the `$prefix` parameter as a full wildcard, but actually as a prefix. Use `$prefix = '%pattern%'` to get the old behaviour. Or use `$parameter = '%suffix'` if you want to match against the end of the names.
2023-07-25 12:13:04 +02:00
- `\humhub\libs\BaseSettingsManager::get()` now returns a pure int in case the (trimmed) value can be converted
2023-05-30 11:36:24 +02:00
- New `PolymorphicRelation::getObjectModel()` : should replace `get_class()`
2023-06-15 14:18:28 +04:00
- Removed deprecated javascript method `setModalLoader()`
2023-06-23 00:45:08 +04:00
- Javascript CSP Nonces are now required and enabled by default! See: https://docs.humhub.org/docs/develop/javascript/
2023-07-17 17:15:47 +04:00
- Use the verifying `Content->canArchive()` before run the methods `Content->archive()`
and `Content->archive()` , because it was removed from within there.
2023-07-25 12:13:04 +02:00
- Permission to configure modules is now restricted to users allowed to manage settings (was previously restricted to users allowed to manage modules). [More info here ](https://github.com/humhub/humhub/issues/6174 ).
2023-12-15 15:11:02 +01:00
- `$guid` properties in `contentcontainer` , `file` , `space` , and `user` models are now enforced to be valid UUIDs
(See `UUID::validate()` ) and unique within the table.
2023-05-03 11:55:00 +02:00
### Type restrictions
- `\humhub\libs\BaseSettingsManager` and its child classes on fields, method parameters, & return types
2023-10-02 14:03:27 +02:00
- `\humhub\libs\Helpers::checkClassType()` (see [#6548 ](https://github.com/humhub/humhub/pull/6548 ))
2024-04-08 17:05:18 +02:00
- rather than throwing a `\yii\base\Exception` , it now throws some variations of `yii\base\InvalidArgumentException`
with different Exception Codes as documented in the function's documentation:
- `\humhub\exceptions\InvalidArgumentClassException`
- `\humhub\exceptions\InvalidArgumentTypeException`
- `\humhub\exceptions\InvalidArgumentValueException`
- the return type has changed from `false` to `string|null`
- the second parameter `$type` is now mandatory
2023-07-07 09:19:25 +02:00
2023-07-10 21:07:48 +02:00
### Deprecations
2024-04-08 17:05:18 +02:00
2023-07-10 21:07:48 +02:00
#### New
- `Content::addTags()` and `Content::addTag()` . Use `ContentTagService`
- `humhub\libs\UUID::is_valid()` . Use `UUID::validate()`
2023-07-07 09:19:25 +02:00
2023-07-10 21:07:48 +02:00
#### Removed
- `humhub\libs\Markdown`
- `humhub\libs\MarkdownPreview`
- `humhub\modules\content\widgets\richtext\AbstractRichText::$markdown`
- `humhub\modules\content\widgets\richtext\AbstractRichText::$maxLength`
- `humhub\modules\content\widgets\richtext\AbstractRichText::$minimal`
2023-07-07 09:19:25 +02:00
- `humhub\modules\content\widgets\richtext\PreviewMarkdown`
2023-07-10 21:07:48 +02:00
- `humhub\modules\content\widgets\richtext\ProsemirrorRichText::parseOutput`
2023-07-07 09:19:25 +02:00
- `humhub\modules\content\widgets\richtext\ProsemirrorRichText::replaceLinkExtension`
- `humhub\modules\content\widgets\richtext\ProsemirrorRichText::scanLinkExtension`
2023-07-10 21:07:48 +02:00
- `humhub\modules\ui\form\widgets\Markdown`
- `humhub\widgets\AjaxButton`
2023-07-07 09:19:25 +02:00
- `humhub\widgets\MarkdownEditor`
- `humhub\widgets\MarkdownField`
- `humhub\widgets\MarkdownFieldModals`
2023-07-10 21:07:48 +02:00
- `humhub\widgets\ModalConfirm`