whip icon indicating copy to clipboard operation
whip copied to clipboard

Design issue with `Whip_Requirement`

Open schlessera opened this issue 7 years ago • 0 comments

The interface Whip_Requirement wants to be an abstract requirement that only knows about a ::component(). However, in Whip_RequirementsChecker::requirementIsFulfilled(), the requirements version() is being checked, despite the interface not having such a method.

So, either Whip_Requirement is actually a Whip_VersionRequirement, or the Whip_RequirementsChecker::requirementIsFulfilled() needs to abstract away what it actually checks.

To abstract this away, it can delegate the isFulfilled() to the requirement itself with all related knowledge it has.

schlessera avatar Mar 08 '17 13:03 schlessera