


<major>.<minor>.<patch># Format everything
box run-script format
# Start a watcher, type away, save and auto-format for you
box run-script format:watch
The official ColdBox 8 upgrade guide
default Argument RemovedmatchVariables Argument Removed
renderExternalView()externalView()/**
* @deprecated Refactor to use the Env Delegate: coldbox.system.core.delegates.Env
*/
function getSystemSetting( required key, defaultValue ){
return new coldbox.system.core.delegates.Env().getSystemSetting( argumentCollection = arguments );
}
/**
* @deprecated Refactor to use the Env Delegate: coldbox.system.core.delegates.Env
*/
function getSystemProperty( required key, defaultValue ){
return new coldbox.system.core.delegates.Env().getSystemProperty( argumentCollection = arguments );
}
/**
* @deprecated Refactor to use the Env Delegate: coldbox.system.core.delegates.Env
*/
function getEnv( required key, defaultValue ){
return new coldbox.system.core.delegates.Env().getEnv( argumentCollection = arguments );
}// Old way - removed
with( namespace = "luis" )
.addRoute(
pattern = "contactus",
view = "simpleview"
)
.addRoute(
pattern = "contactus2",
view = "simpleview",
viewnoLayout = true
)
.endWith();
// New way - use group() with closure
group( { namespace : "luis" }, ( options ) => {
route( pattern: "contactus" ).toView( view: "simpleview" );
route( pattern: "contactus2" ).toView( view: "simpleview", noLayout: true );
} );
// Old way - removed
router.addRoute(
pattern : "/myroute",
handler : "myHandler",
action : "myAction",
matchVariables : "id=1&name=test"
)
// New way - use rc or prc
router.addRoute(
pattern : "/myroute",
handler : "myHandler",
action : "myAction",
rc : { id = 1, name = "test" }
)// Old way - removed
interceptorService.processState( "myEvent", data );
// New way - use announce()
interceptorService.announce( "myEvent", data );// Search for these deprecated patterns:
- extends="coldbox.system.cache.ICacheProvider"
- extends="coldbox.system.cache.IStats"// Search for BeanPopulator instantiation or injection:
- new coldbox.system.core.dynamic.BeanPopulator()
- property name="beanPopulator" inject="BeanPopulator"
- wirebox.getInstance( "BeanPopulator" )// Search for client flash scope references:
- flash.setFlash()
- flash.getFlash()
- flashScope="client"
- setNextEvent( flashScope="client" )// Search for deprecated util methods:
- getSystemSetting()
- getSystemProperty()
- getEnv()
// When found in non-Env delegate contexts// In WireBox binders, search for:
- .getProperty( default=
- .getCacheBoxConfig()// Search for these method calls:
- event.isSES()
- event.setSESEnabled()// Search for these router method calls:
- router.getModulesRoutingTable()
- router.includeRoutes()
- router.with()
- router.endWith()
- router.setFullRewrites()
- matchVariables argument in addRoute()// Search for deprecated InterceptorService method calls:
- interceptorService.processState()
- processState() // when called within interceptor context// Search for these method calls in handlers/interceptors:
- renderView()
- renderLayout()
- renderExternalView()
- announceInterception()
- populateModel()
- newSchedule() // in ScheduledExecutor context// Replace:
extends="coldbox.system.cache.ICacheProvider"
// With:
extends="coldbox.system.cache.providers.ICacheProvider"
// Replace:
extends="coldbox.system.cache.IStats"
// With:
extends="coldbox.system.cache.util.IStats"// Replace all instances of:
BeanPopulator
// With:
ObjectPopulator
// Replace injection:
inject="BeanPopulator"
// With:
inject="ObjectPopulator"// Replace utility method calls with Env delegate:
getSystemSetting( "key", "default" )
// With:
new coldbox.system.core.delegates.Env().getSystemSetting( "key", "default" )
// Or inject the delegate:
property name="env" inject="coldbox.system.core.delegates.Env";
// Then use:
env.getSystemSetting( "key", "default" )// Replace:
.getProperty( key, default=value )
// With:
.getProperty( key, defaultValue=value )
// Replace:
.getCacheBoxConfig()
// With:
.getCacheBox()// Replace:
router.getModulesRoutingTable()
// With:
router.getModuleRoutingTable()
// Replace with() and endWith() patterns:
router.with( "api", function( route ) {
route.get( "/users", "users.index" );
} ).endWith();
// With:
router.group( { prefix: "api" }, function( route ) {
route.get( "/users", "users.index" );
} );
// Replace matchVariables:
router.addRoute(
pattern="/route",
handler="handler",
matchVariables="id=1&name=test"
)
// With:
router.addRoute(
pattern="/route",
handler="handler",
rc={ id=1, name="test" }
)// Replace:
interceptorService.processState( "eventName", data )
// With:
interceptorService.announce( "eventName", data )
// Replace:
processState( "eventName", data )
// With:
announce( "eventName", data )// Replace deprecated methods:
renderView() -> view()
renderLayout() -> layout()
renderExternalView() -> externalView()
announceInterception() -> announce()
populateModel() -> populate()
newSchedule() -> newTask()// Remove or replace client flash usage:
// Replace with session or cachebox alternatives
setNextEvent( url="page", flashScope="client" )
// With:
setNextEvent( url="page" ) // uses session by default
// Or:
setNextEvent( url="page", flashScope="session" )

Discover the power of ColdBox 8.0.0

# CommandBox
box install bx-coldbox
# BoxLang Module
install-bx-module bx-coldbox ██████╗ ██████╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗██╗ ██╗
██╔════╝██╔═══██╗██║ ██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝ ██╔════╝██║ ██║
██║ ██║ ██║██║ ██║ ██║██████╔╝██║ ██║ ╚███╔╝█████╗██║ ██║ ██║
██║ ██║ ██║██║ ██║ ██║██╔══██╗██║ ██║ ██╔██╗╚════╝██║ ██║ ██║
╚██████╗╚██████╔╝███████╗██████╔╝██████╔╝╚██████╔╝██╔╝ ██╗ ╚██████╗███████╗██║
╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚═╝install coldbox-cli
coldbox --help# Use the new boxlang template
coldbox create app MyBoxLangApp
# Use the new modern template
coldbox create app MyBoxLangApp skeleton=modern
coldbox create app MyBoxLangApp --cfmlMyBoxLangApp/
├── 📁 app/ # 🔒 Secure ColdBox App
│ ├── config/ # Configuration
│ ├── handlers/ # Event handlers (controllers)
│ ├── interceptors/ # Interceptors
│ ├── layouts/ # Layout templates
│ ├── models/ # Business logic layer
│ ├── modules/ # Custom Modules
│ ├── views/ # Presentation templates
│ └── layouts/ # Page layout templates
├── 📁 modules/ # 🗳️ CommandBox Tracked Modules
├── 📁 public/ # 🌐 Web-accessible directory
│ ├── index.bxm # Application entry point
│ ├── includes/ # CSS, JS, images
│ └── Application.bx # Public bootstrap
├── 📁 resources/ # 🛠️ Development assets
│ └── database/migrations/ # Database version control
├── 📁 runtime/ # 🏃 Runtime libraries & logs
├── 📁 tests/ # 🧪 Testing suite
└── Build.bx # 🚀 BoxLang build automation
└── box.json # CommandBox project descriptor
└── server.json # CommandBox server descriptor
└── pom.xml # Maven project descriptorMyModernApp/
├── 📁 app/ # 🔒 Secure ColdBox Application (above webroot)
│ ├── config/ # Configuration
│ ├── handlers/ # Event handlers (controllers)
│ ├── interceptors/ # Interceptors
│ ├── layouts/ # Layout templates
│ ├── models/ # Business logic layer
│ ├── modules/ # Custom Modules
│ ├── views/ # Presentation templates
│ └── layouts/ # Page layout templates
├── 📁 public/ # 🌐 Web-accessible directory
│ ├── index.cfm # Application entry point
│ └── includes/ # Static assets (CSS, JS, images)
├── 📁 docker/ # 🐳 Container orchestration
│ ├── Dockerfile # Multi-stage production builds
│ └── docker-compose.yml # Development environment
├── 📁 resources/ # 🗃️ Application resources
│ └── database/migrations/ # Database version control
├── 📁 lib/ # 📚 Framework libraries
│ ├── coldbox/ # ColdBox framework files
│ └── testbox/ # Testing framework
└── 📁 tests/ # 🧪 Comprehensive test suite
└── box.json # CommandBox project descriptor
└── server.json # CommandBox server descriptor
└── pom.xml # Maven project descriptor









