Taffy
Taffy copied to clipboard
api.cfc doesn't resolve dependencies recursively if an internal and an external bean factory are used
After posting #276, I just thought I'd use DI/1 and Taffy's bean factory together. This works nicely. However, I was duplicating some properties in some resource cfc's so I moved those one level up to a base resource cfc that those cfc's are extending. Now those properties are no longer populated, because the resolveDependencies function (in api.cfc) is only looking at properties at the top level.
A solution would be to make this function recursive. Another solution would be to incorporate this in Taffy's factory (which is resolving recursively). IMO the second approach would be better, as it would remove the need for the resolveDependencies function. I'd be happy to submit a pull request, just let me know which approach you'd like me to take (if any).
Sounds like the 2nd approach makes more sense. Go for it! :+1:
Any progress?
Sorry Adam, I’ve had lack of time lately.. will try to do this over the weekend..!