Skip to content

Version 6 Migration

Mat Lipe edited this page Apr 17, 2026 · 14 revisions

Version 6 is a major release with many breaking changes. This guide to show you how to migrate your project from version 5 to version 6.

It is strongly recommended to use PHPStan to detect changes.

Getting Started

The majority of changes have called out using _deprecated functions and phpdocs in version 5.10.0 of the library. It is recommended to follow this procedure before updating to version 6.

  1. Update to version 5.10.*
  2. Enable WP_DEBUG.
  3. Return true on the deprecated_class_trigger_error filter (if applicable).
  4. Run through your normal unit/regression testing and follow any prompts from the _deprecated system.

WordPress Version Change

6.6.0 is now the minimum supported version of WordPress core.

PHP Version Change

PHP 8.4 is now the minimum supported version. This was done to support async visibility in class properties and therefore cleanup a lot of associative array spaghetti.

CMB2 Field Registering

  1. All properties have been made protected in favor of using the methods with the same name as the properties.
  2. Some of the Registered barely used methods have been removed. Unlikely to affect you.
  3. Default_Callback class has been moved to Field\Default_Callback
  4. Field_Type class has been moved to Field\Field_Type.
  5. Event_Callbacks class has been moved to Field\Event_Callbacks.
  6. BoxType trait has been moved to Box\BoxType.
  7. Display trait has been moved to Field\Display.
  8. All callable have been changed to \Closure. migrate existing usage via first class callable.
  9. Removed \Lipe\Lib\CMB2\Variation\Taxonomy::store_user_terms_in_meta in favor of \Lipe\Lib\CMB2\Variation\Taxonomy::store_terms_in_meta

Theme Common Classes

  1. All deprecated Handle class constants have been removed.
  2. The Resources::unpkg_integrity method has been removed.
  3. The Resources::use_cdn_for_resources method has been removed.
  4. ResourceHandles interface now requires a get_manifest method.
  5. The CSS_ENUM_HANDLE constant has been removed from Common. Use CSS_ENUMS and define a proper dist_path for SCRIPT_DEBUG true and false.
  6. The Enqueue::get_manifest method has been removed in favor of using the get_manifest method on the ResourceHandles.

Logger

  1. Killed 'WithContextinterface in favor of combining withHandle.
  2. Handle interface now requires provide_context method.

Moved Classes

  1. \Lipe\Lib\Post_Type\Custom_Post_Type is now \Lipe\Lib\Post_Type\Post_Type
  2. \Lipe\Lib\Post_Type\Custom_Post_Type\Register_Post_Type is now \Lipe\Lib\Post_Type\Register_Post_Type

Killed Methods

  1. \Lipe\Lib\Util\Arrays::find_index use native PHP array_find_key.
  2. \Lipe\Lib\Util\Arrays::find use native PHP array_find.

Clone this wiki locally