My coworker noticed recently that WireBox doesn't use inherited annotations.
Consider the following two classes:
abstract.cfc
<cfcomponent scope="session">
</cfcomponent>
concrete.cfc
<cfcomponent extends="abstract">
</cfcomponent>
If you ask WireBox to create an instance of abstract it will be persisted in the session scope. However, if you create an instance of concrete it doesn't inherit the scope annotation from it's super class.
This is because getMetaData(concrete) represents inherited attributes in the "extends" key and doesn't combine them down. WireBox currently solves that for functions and properties by recursion in the processDIMetadata method.
I propose that WireBox be changed to also look at extending classes to determine component annotations. I have submitted a pull request which implements a utility method called getInheritedMetaData() that returns a combined metadata struct containing the "final" inherited list of properties, functions, and component annotations for Wirebox to use. This means that component annotations will now be properly inherited plus processDIMetadata() doesn't need to recurse any longer.
Thanks!
~Brad