[Coldbox 6.2] Provider annotation not working

In my wirebox config, I have a mapping of a CFC into the session scope:
map(“recentlyViewedProducts”).to(“models.recentlyViewedProducts”).into(THIS.SCOPES.SESSION);

I have a singleton called recentlyViewedProductsService. I’m using the provider annotation in a function called recentlyViewed within that service CFC.

When I call that provider function, nothing is stored into the session scope.

This functionality worked in Coldbox 5.3 and ceased to work when I upgraded to Coldbox 6.2. I have upgraded cbstorages to the latest version as well and that did not fix my issue.

Does anyone have any idea as to why wirebox would suddenly stop storing the CFCs data in the session scope?

Sorry – I keep figuring out the answer right after I post about it – but maybe this will help someone else.

So in addition to mapping the annotation into the session scope, I also had to add the “scope=session” annotation to the component definition. I didn’t need to do this in Coldbox v5, but I guess it is necessary in v6.