Taffy icon indicating copy to clipboard operation
Taffy copied to clipboard

api.cfc doesn't resolve dependencies recursively if an internal and an external bean factory are used

Open neoneo opened this issue 10 years ago • 3 comments

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).

neoneo avatar Jun 24 '15 09:06 neoneo

Sounds like the 2nd approach makes more sense. Go for it! :+1:

atuttle avatar Jun 25 '15 14:06 atuttle

Any progress?

atuttle avatar Jul 08 '15 20:07 atuttle

Sorry Adam, I’ve had lack of time lately.. will try to do this over the weekend..!

neoneo avatar Jul 10 '15 09:07 neoneo