Replace the zip-based, mixin-injection plugin system with a Service Provider model.
component implements="wheels.ServiceProviderInterface" {
function register(container) {
container.map("auth").to("MyAuth.AuthService").asSingleton();
}
function boot(app) {
app.addMiddleware("MyAuth.AuthMiddleware");
app.modelTrait("authenticatable", "MyAuth.Authenticatable");
}
}
Phase 4 — Modernization Target #14 (Wheels 4.0)
Replace the zip-based, mixin-injection plugin system with a Service Provider model.
Current Problems
StructAppendinto variable scopes — collision riskProposed Design
component implements="wheels.ServiceProviderInterface" { function register(container) { container.map("auth").to("MyAuth.AuthService").asSingleton(); } function boot(app) { app.addMiddleware("MyAuth.AuthMiddleware"); app.modelTrait("authenticatable", "MyAuth.Authenticatable"); } }Migration Path
ServiceProviderinterface alongside existing plugin systemServiceProvider.cfcfor new-style registrationwheels-legacy-plugin-adapterfor running old plugins in 4.0Dependencies
Benefits from expanded DI container (#1912) and middleware pipeline (#1906).
See
design_docs/MODERNIZE-WHEELS-RIM.md§4.10 for full implementation plan.Wheels 4.0 Sub-Issues