Skip to content

Version 6 Migration

Mat Lipe edited this page Apr 2, 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.

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.

Clone this wiki locally