feat: (W-005) Interface-driven design contracts for Wheels 4.0#2014
Open
feat: (W-005) Interface-driven design contracts for Wheels 4.0#2014
Conversation
Define 18 CFML interfaces covering Model, Controller, View, Routing, Events, Database, and DI subsystems. Add 4 re-export wrappers for existing interfaces (MiddlewareInterface, ServiceProviderInterface, AuthenticatorInterface, AuthStrategy) to provide a unified catalog at vendor/wheels/interfaces/. - Add implements= to Injector.cfc (InjectorInterface) and EventMethods.cfc (EventHandlerInterface) for compile-time enforcement - Register 16 interface→implementation bindings in Bindings.cfc - All method signatures verified against actual source code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 9 test spec files verifying: - All 22 interface CFCs compile cleanly on all engines - Re-export wrappers extend their original interfaces - Compile-time implements= enforcement on Injector and EventMethods - Method existence and parameter signature verification for Model, Controller, View, Routing, Event, Database, and DI contracts - DI binding resolution for all 16 registered interface mappings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…compliance - EventHandlerInterface: remove explicit types from parameters to match implementation (CFML implements= requires exact type matching) - ModelPersistenceInterface: remove allowExplicitTimestamps from save() (not present in actual implementation) - RouteResolverInterface: remove $findMatchingRoute (lives on Dispatch, not Mapper which is the binding target) - DatabaseInterfaceSpec: fix H2 adapter component paths (H2.H2Model) - InterfaceCompilationSpec: handle cross-engine metadata differences for interface extends - InjectorInterfaceSpec: create fresh Injector instance instead of relying on application.wheelsdi (reset during test lifecycle) - Bindings.cfc: fix comment with correct adapter path Verified: Lucee 6 + Lucee 7, H2, 2319 pass / 0 fail / 0 error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tations Fixes all signature mismatches identified in adversarial review: - ModelFinderInterface: count param boolean→numeric, useIndex string→struct, count() return numeric→any with added group param - ModelPropertyInterface: tableName() remove phantom param, table() required any, primaryKeys() add position param, add primaryKey() method - ModelPersistenceInterface: useIndex string→struct in 4 methods - ControllerFlashInterface: flashDelete void→any, key required - ControllerRenderingInterface: renderNothing/renderText status types - ViewContentInterface: contentFor position/overwrite string/boolean→any - ViewLinkInterface: paginationLinks add 5 missing params, encode boolean→any Tests updated with param checks for count() and paginationLinks(). Verified: 2321 pass, 0 fail, 0 error on Lucee 6 + Lucee 7. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ams, new interfaces Fixes 2 blocking issues and adds 3 non-blocking improvements from adversarial review: Blocking: - Fix ModelPersistenceInterface binding: wheels.model.crud → wheels.model.create - Fix ViewContentInterface binding: wheels.view.content → wheels.view.miscellaneous - Add back, method, url params to ControllerRenderingInterface.redirectTo (14→17 params) Non-blocking: - New ModelErrorInterface (8 methods: addError, hasErrors, allErrors, etc.) - Add average/maximum/minimum/sum to ModelFinderInterface - Add scope/enum to ModelPropertyInterface Tests: getInstance() resolution test catches broken bindings at test time. Verified: Lucee 6 + Lucee 7, H2 — 2334 pass, 0 fail, 0 error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Defines interfaces for all core subsystems, enabling drop-in replacements as part of the Wheels 4.0 architecture (#1967, epic #1917).
Injector.cfcandEventMethods.cfcviaimplements=Bindings.cfcfor all 16 mixin interfacesInterface Groups
implements=)implements=)Quality Process
Known Follow-up Items
Coverage gaps that should be tracked as separate issues:
Test plan
Closes #1967
🤖 Generated with Claude Code