humhub/MIGRATE-DEV.md
Martin Rüegg 1b0700deed
Improve settings handling and add tests (#6270)
* Fix #6266: BaseSettingsManager::deleteAll() does use prefix as wildcard

* Enh #6271: Add input and type checks, as well as strict types to SettingsManager

* Fix #6267 SettingsManager::flushContentContainer() only clears the collection in the current instance, not the underlying cache

* Enh #6272: Always return integer from settings, if value can be converted

* Improve \humhub\libs\BaseSettingsManager::getSerialized() to allow return value be an object and throw an exception on decoding error

* Enh #6270: Add tests for SettingsManager
2023-05-03 09:55:00 +00:00

802 B

Module Migration Guide

See humhub/documentation::docs/develop/modules-migrate.md for full version.

Version 1.15 (Unreleased)

Behaviour change

  • \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 converted

Type restrictions

  • \humhub\libs\BaseSettingsManager and its child classes on fields, method parameters, & return types