Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.64 KB

File metadata and controls

23 lines (18 loc) · 1.64 KB

Upgrade Guide

Always run the latest migrations after upgrading.

Version 1 to 2


This was a major refactor, focusing on simplifying the library and splitting out the storage/retrieval aspect to SettingModel. The service and the library's getters and setters remain the same so most code should not need updating, but be aware of the following points:

  • Instead of a session key provide an implementation of codeigniter4/authentication-implementation for determining the current user (see User Guide).
  • Corollary, the library assumes the required function is pre-loaded (e.g. call helper('auth') before using Settings).
  • The scope field has been removed (though remains temporarily in the database)
  • The protected field now handles scope's original role: determining whether a Setting is "global" or can be overridden by a user value.
  • The config file is stripped of unused properties - update to the latest (see examples/)
  • Module Exceptions have been removed, do not try to catch them
  • An existing template is no longer a requirement for a Setting (see README on "Dynamic Settings")

Note: A few database fields were incorrect (missing defaults, incorrect null). The migrations have already been updated to reflect their proper state. This only really affects testing so new migrations were not generated, but current production instances should be aware of the nuanced differences.