MIGRATE-DEV.md
AltchaCaptchaInput::$showOnFocusElement and YiiCaptchaInput::$showOnFocusElement allowing hiding the Captcha input until a form field is focuseduser/views/layouts/main.php layout to set the container width (see PR #8054): .container-registration, .container-login and .container-passwordhumhub\widgets\bootstrap\Button, humhub\widgets\bootstrap\Link, humhub\widgets\bootstrap\Badge, humhub\modules\ui\menu\widgets\DropdownMenu labels are now HTML encoded by default. Set encodeLabel to false if already encoded.Updated minimum required PHP version to 8.2.
\humhub\components\captcha\CaptchaInterface\humhub\components\captcha\AltchaCaptcha\humhub\components\captcha\AltchaCaptchaInput\humhub\components\captcha\AltchaCaptchaValidator\humhub\components\captcha\AltchaCaptchaAction\humhub\components\captcha\AltchaCaptchaAsset\humhub\components\captcha\YiiCaptcha\humhub\components\captcha\YiiCaptchaInput\humhub\components\captcha\YiiCaptchaValidatorYii::$app->captcha component\humhub\assets\DriverJsAsset (driver.js)\humhub\modules\tour\Module::tourConfigFiles (allows customizing the introduction tour)\humhub\modules\tour\Module::driverJsOptions\humhub\widgets\mails\MailHeaderImage widget for displaying a header image in emailshumhub\helpers\MailStyleHelper to get Sass variable values in email templates\humhub\components\Theme::CORE_THEME_NAME\humhub\modules\user\models\forms\EVENT_AFTER_SET_FORM\humhub\components\Migration::safeAlterColumn()\humhub\components\Application::isInstalled() use \humhub\components\Application::hasState() instead\humhub\components\Application::isDatabaseInstalled() use \humhub\components\Application::hasState() instead\humhub\components\Application::setInstalled() use \humhub\components\Application::setState() insteadhumhub\modules\ui\mail\DefaultMailStyle use humhub\helpers\MailStyleHelper instead.env:| Old Key | New Key |
|---|---|
mailer.transportType | mailerTransportType |
mailer.dsn | mailerDsn |
mailer.hostname | mailerHostname |
mailer.username | mailerUsername |
mailer.password | mailerPassword |
mailer.useSmtps | mailerUseSmtps |
mailer.port | mailerPort |
mailer.encryption | mailerEncryption |
mailer.allowSelfSignedCerts | mailerAllowSelfSignedCerts |
mailer.systemEmailAddress | mailerSystemEmailAddress |
mailer.systemEmailName | mailerSystemEmailName |
mailer.systemEmailReplyTo | mailerSystemEmailReplyTo |
proxy.* | proxy* |
tour module:
\humhub\widgets\DataSaved, the related code Yii::$app->getSession()->setFlash('data-saved', Yii::t('base', 'Saved')); must be replaced with $this->view->saved(); on controllerstests/codeception.yml: log: codeception/_output => output: codeception/_outputtests/codeception/*.suite.yml: class_name: *Tester => actor: *Tester$I->waitFor*('Text', null) => $I->waitFor*('Text', 10), the second param can be only integer for the methods:
waitForText()waitForElement()waitForElementVisible()waitForElementNotVisible()waitForElementClickable()$I->amOnPage(['/some/page/url', 'id' => 1]) => $I->amOnRoute('/some/page/url', ['id' => 1])\humhub\modules\user\Module::$invitesTimeToLiveInDays use \humhub\modules\admin\Module::$cleanupPendingRegistrationInterval insteadMethod signature changed - humhub\modules\user\models\fieldtype\BaseType::getUserValue(User $user, bool $raw = true, bool $encode = true): ?string
Constructor changed - humhub\modules\user\models\forms\Registration and properties ($enablePasswordForm, $enableMustChangePassword, $enableEmailField) are now private
autofocus attribute is now required on the field. More info: #7136\humhub\modules\admin\Module::$enableManageAllContentPermission option.enableManageAllContentPermission is disabled), to edit and delete content in other Profile streams.--hh-fixed-header-height and --hh-fixed-footer-height (see #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)\humhub\modules\user\Module::$passwordHint (see #5423)DeviceDetectorHelper class: isMobile(), isTablet(), getBodyClasses(), isMultiInstanceApp() and appOpenerState()DeviceDetectorHelper::getBodyClasses())\humhub\modules\ui\menu\MenuEntry::isActiveState() use \humhub\helpers\ControllerHelper::isActivePath() instead\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\humhub\modules\user\models\User::canViewAllContent() use \humhub\modules\user\models\User::canManageAllContent() insteadInclude captcha in registration form checkbox removed from "Administration" -> "Users" -> "Settings"\humhub\modules\content\widgets\richtext\AbstractRichText::$record\humhub\widgets\ShowMorePager widgetAt least PHP 8.0 is required with this version.
\humhub\modules\search\* The existing search module was removed and the related features merged into the 'content', 'user' and 'space' modules.\humhub\modules\user\models\User::getSearchAttributes() and \humhub\modules\space\models\Space::getSearchAttributes()/search/mentioning -> /user/mentioningYii::$app->search() component is not longer available.
(new ContentSearchService($exampleContent->content))->update(); instead of Yii::$app->search->update($exampleContent);setCellValueByColumnAndRow() has been replaced with setCellValue() and setValueExplicit().setCellValue() method with the appropriate coordinate obtained using getColumnLetter().Module::$resourcesPath to resources\humhub\components\Module::getIsActivated() use getIsEnabled() instead
(note: this also affects the virtual instance property \humhub\modules\friendship\Module::$isActivated which should now read $isEnabled!)\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\humhub\modules\content\components\ContentAddonActiveRecord::canWrite()\humhub\modules\file\models\File::canRead() use canView() instead\humhub\modules\friendship\Module::getIsEnabled() use isFriendshipEnabled() instead
(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.)\humhub\modules\marketplace\Module::isEnabled() use isMarketplaceEnabled() instead\humhub\modules\marketplace\services\ModuleService::activate() use enable() insteadhumhub\modules\stream\actions\GlobalContentStreamhumhub\modules\stream\models\GlobalContentStreamQueryhumhub\modules\stream\models\filters\GlobalContentStreamFilterSpreadsheetExport::getColumnLetter() has been introduced to get the column letter based on the column index.\humhub\commands\MigrateController enforces types on fields, method parameters, & return types\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\humhub\components\bootstrap\ModuleAutoLoader::findModulesByPath() is enforcing types on method parameters and return value\humhub\components\bootstrap\ModuleAutoLoader::locateModules() is enforcing return type\humhub\components\ModuleManager::register() is enforcing types on method parameters\humhub\modules\comment\models\Comment on canDelete()\humhub\modules\content\components\ContentAddonActiveRecord on canDelete(), canWrite(), canEdit()\humhub\modules\content\models\Content on canEdit(), canView()\humhub\modules\file\models\File on canRead(), canDelete()\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.\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.\humhub\libs\BaseSettingsManager::get() now returns a pure int in case the (trimmed) value can be convertedPolymorphicRelation::getObjectModel(): should replace get_class()setModalLoader()Content->canArchive() before run the methods Content->archive()
and Content->archive(), because it was removed from within there.$guid properties in contentcontainer, file, space, and user models are now enforced to be valid UUIDs
(See UUID::validate()) and unique within the table.\humhub\libs\BaseSettingsManager and its child classes on fields, method parameters, & return types\humhub\libs\Helpers::checkClassType() (see #6548)
\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\InvalidArgumentValueExceptionfalse to string|null$type is now mandatoryContent::addTags() and Content::addTag(). Use ContentTagServicehumhub\libs\UUID::is_valid(). Use UUID::validate()humhub\libs\Markdownhumhub\libs\MarkdownPreviewhumhub\modules\content\widgets\richtext\AbstractRichText::$markdownhumhub\modules\content\widgets\richtext\AbstractRichText::$maxLengthhumhub\modules\content\widgets\richtext\AbstractRichText::$minimalhumhub\modules\content\widgets\richtext\PreviewMarkdownhumhub\modules\content\widgets\richtext\ProsemirrorRichText::parseOutputhumhub\modules\content\widgets\richtext\ProsemirrorRichText::replaceLinkExtensionhumhub\modules\content\widgets\richtext\ProsemirrorRichText::scanLinkExtensionhumhub\modules\ui\form\widgets\Markdownhumhub\widgets\AjaxButtonhumhub\widgets\MarkdownEditorhumhub\widgets\MarkdownFieldhumhub\widgets\MarkdownFieldModalshumhub\widgets\ModalConfirm