Upgrading to ColdBox 8

The official ColdBox 8 upgrade guide

The major compatibility issues will be covered, as well as how to upgrade to this release from previous ColdBox versions smoothly. You can also check out the What's New guide to give you a full overview of the changes.

An upgrade from ColdBox 7 should not incur any breaking changes, but you should still read through the guide to ensure you are not using any deprecated or removed features.

ColdFusion 2018-2021 Support Dropped

ColdFusion 2018-2021 support has been dropped. Adobe doesn't support them anymore, so neither do we.

Removals

CacheBox Tag Interfaces: ICacheProvider, IStats

The old interfaces that had been marked for deprecation in 6 are now removed. If you have custom cache providers or stats providers, you will need to update them to extend from the base classes:

  • coldbox.system.cache.ICacheProvider -> coldbox.system.cache.providers.ICacheProvider

  • coldbox.system.cache.IStats -> coldbox.system.cache.util.IStats

BeanPopulator

The BeanPopulator class has been removed. This class was deprecated in ColdBox 6 and was replaced by the ObjectPopulator class. Please use coldbox.system.core.dynamic.ObjectPopulator instead.

Client Flash

The Client Flash has been removed as it was deprecated in v6. The client scope is a very old, unperformant and insecure way of storing data. We recommend using CacheBox or Session scope instead.

ColdBox Util Env/System Methods

The following methods were removed in preference to the Environment Delegate class: coldbox.system.core.delegates.Env.

Binder.getProperty() default Argument Removed

The default argument was deprecated in ColdBox 6 and has now been removed. Please use defaultValue instead.

Binder.getCacheBoxConfig() Removed

The getCacheBoxConfig() method was deprecated in ColdBox 6 and has now been removed. Please use getCacheBox() instead.

RequestContext SES Methods Removed

The following methods were removed from the RequestContext class. These methods were deprecated in ColdBox 7.

  • isSES()

  • setSESEnabled()

Router.getModulesRoutingTable() Removed

The getModulesRoutingTable() method was deprecated in ColdBox 7 and has now been removed. Please use getModuleRoutingTable() instead.

Router.includeRoutes() removed

The includeRoutes() method was deprecated in ColdBox 6 and has now been removed. This was for cfm routers which are no longer in use.

Router.with() and endWith() removed

The with() and endWith() methods were deprecated in ColdBox 7 and have now been removed. Please use the group() method with closures instead.

Router.addRoute() matchVariables Argument Removed

The matchVariables string argument that mimicked a query string was deprecated in ColdBox 6 and has now been removed. Please use the rc or prc struct arguments instead.

Router.setFullRewrites() Removed

The setFullRewrites() method has been removed from the Router. This method was used to enable/disable SES URL rewrites but is no longer needed as SES routing is handled automatically.

InterceptorService.processState() Removed

The processState() method has been removed from the InterceptorService (COLDBOX-1358). This method was deprecated and has now been completely removed.

Migration: Use the announce() method instead.

Deprecations

The following methods were deprecated in ColdBox 7 and will be removed in ColdBox 9.

Super Type Methods

  • renderView() -> use view()

  • renderLayout() -> use layout()

  • renderExternalView() -> use externalView()

  • announceInterception() -> use announce()

  • populateModel() -> use populate()

ScheduledExecutor

  • newSchedule() -> use newTask()

AI-Assisted Upgrade Instructions

The following instructions are designed to help AI assistants inspect and automatically upgrade ColdBox applications from version 7 to version 8.

Code Inspection Patterns

When analyzing ColdBox applications for upgrade compatibility, check for these patterns:

1. Cache Provider Interface Usage

Look for implementations extending deprecated interfaces:

2. BeanPopulator Usage

3. Client Flash Scope Usage

4. Environment Method Usage

5. Deprecated Binder Methods

6. RequestContext SES Methods

7. Router Removed Methods

8. InterceptorService Removed Methods

9. Super Type Method Usage

Automated Replacement Rules

Apply these replacements when upgrading code:

Cache Provider Updates

BeanPopulator to ObjectPopulator

Environment Method Delegation

Binder Method Updates

Router Method Updates

InterceptorService Method Updates

Super Type Method Updates

Client Flash Removal

Upgrade Validation

After applying automated changes, verify:

  1. Engine Compatibility: Ensure minimum ColdFusion 2021+ or Lucee 5.3+

  2. Test Coverage: Run existing test suites to validate functionality

  3. Cache Providers: Test custom cache provider implementations

  4. Module Compatibility: Verify all modules work with updated router methods

  5. Environment Variables: Ensure environment delegate usage works correctly

Manual Review Required

These patterns require manual developer review:

  • Custom cache providers extending old interfaces need logic review

  • Complex routing configurations using deprecated methods may need restructuring

  • Client flash scope usage requires architectural decisions for replacement

  • Environment method usage in performance-critical code may benefit from injection optimization

Completion Checklist

Last updated

Was this helpful?