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 type inconsistencies as version 5 introduces a large number of strict types.

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 support 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. Some callable have been changed to \Clousure migrate existing usage via first class callables.

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.

Clone this wiki locally