WireBox 2.0.0 is a major release of our Dependency Injection and AOP library with some major fixes and some cool new updates.
You can find the release version information here: https://ortussolutions.atlassian.net/browse/WIREBOX/fixforversion/12300
Bugs
[WIREBOX-31] -Builder.buildDSLDependency does not use the custom DSL correctly as the default namespace kicks in
Improvements
[WIREBOX-32] -binder.mapDirectory now skips hidden dirs
[WIREBOX-35] -Remove coldbox:cacheManager DSL reference, it is no longer valid
New Features
[WIREBOX-2] -allow mapDSL to be altered at runtime by modules via new wirebox method: registerDSL()
[WIREBOX-30] -Support wiring new injection DSL = byType, which leverages the type to match to an implementation
[WIREBOX-33] -Add a force argument to the map functions so you can override if a mapping already exists
[WIREBOX-36] -New coldbox dsl to get a renderer reference: coldbox:renderer
The ColdBox injection DSL has had major updates to get to the ColdBox 4 standards.
All ocm injections have been removed in preference to
cachebox injection DSL
The coldbox:cachemanager DSL has been removed in preference to
cachebox injection DSL
All plugin injections have been deprecated in preference to
model/object injections
New coldbox:renderer dsl to inject the new ColdBox system
renderer
The map() function on the Configuration Binder now has a force argument which allows you to map no matter if the mapping exists or not already.
Injectors allow you to register custom DSLs at runtime by using the registerDSL() method on any injector. This feature was mostly done for modules, so they could enhance WireBox in a ColdBox context. However, this also allows you to leverage this in any non-ColdBox applications.
We have expanded our custom DSL and injectors to allow you to do injection by ColdFusion types. This feature is more in-line with features from Java or static languages were you can tell injectors to inject by argument or property type. Let's say you have a package of interfaces with subpackages of implementations:
You then want to rely on the interface type field of properties in my dependent CFCs and leveraging the byType injection DSL. You would first map the right implementation using the alias as the name of the Interface.