InversifyJS icon indicating copy to clipboard operation
InversifyJS copied to clipboard

Rebind is broke when upgraded from v5 to v6

Open nitzcard opened this issue 2 years ago • 3 comments

I tried upgrading from inversify 5 to 6, and now I see all the .rebind in my system do not work properly. The entity being rebinded, but when consumed thought another class later on, it still gets the first binding of the class.

illustration:

di.bind('config').toConstantValue(7)
di.rebind('config').toConstantValue(8)
di.resolve('classThatUsingConfig') => config = 7

expected: config = 8 inside classThatUsingConfig

nitzcard avatar Jun 02 '23 11:06 nitzcard

Did you ever found a solution for this?

weyert avatar Dec 05 '23 00:12 weyert

Thanks for the report @nitzcard @weyert, I will investigate this and aim to resolve in the 6.0.3 release.

Jameskmonger avatar Dec 17 '23 14:12 Jameskmonger

@Jameskmonger Thank you, that would be great.

weyert avatar Dec 17 '23 16:12 weyert