-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
enhancementphase:3-pluginsPlugin lifecycle, DI, middleware, migration bridgePlugin lifecycle, DI, middleware, migration bridge
Milestone
Description
Summary
The current dependency system ($determineDependency()) only checks whether a named plugin is loaded — it cannot express version constraints. A plugin declaring dependency="authenticateThis" succeeds even if the loaded version is incompatible.
Current Behavior
// Plugins.cfc ~line 198-213
// Checks: does a plugin with this name exist in the loaded plugins struct?
// No version comparison whatsoeverProposed Behavior
Declaration (in plugin.json)
{
"dependencies": {
"authenticateThis": ">=1.0.0 <2.0.0",
"wheels-utils": "^3.0.0"
}
}Resolution
- Parse semver constraints from
plugin.jsondependencies - Compare against the
versionreported by each loaded plugin - On constraint mismatch:
- Development: throw an error with clear message ("Plugin X requires authenticateThis >=1.0.0 but 0.9.2 is loaded")
- Production: log a warning
- Plugins without
plugin.jsonfall back to existing presence-only check
Semver Support
Standard semver operators: >=, <=, >, <, =, ^ (compatible), ~ (patch-level). Implement a lightweight semver comparison utility (or use existing CFML library if available).
Files
vendor/wheels/Plugins.cfc:198-213— replace$determineDependency()- Depends on: Add plugin.json manifest support alongside box.json #1976 (plugin.json manifest for version declaration)
Phase
Phase 2 — DI Integration & Lifecycle (3.x, backward compatible)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementphase:3-pluginsPlugin lifecycle, DI, middleware, migration bridgePlugin lifecycle, DI, middleware, migration bridge