A relatively common pattern is to allow a hook to be specified multiple times. At present, calling a before or after multiple times will override the previous value.
I've attached a spec tweaked to demonstrate what I'd consider the less surprising behavior. I'm not conversant enough to argue with the Dry::Intitializer macros to make this actually pass, but I wanted to get this noted before we go live with the hooks.
A relatively common pattern is to allow a hook to be specified multiple times. At present, calling a
before
orafter
multiple times will override the previous value.I've attached a spec tweaked to demonstrate what I'd consider the less surprising behavior. I'm not conversant enough to argue with the Dry::Intitializer macros to make this actually pass, but I wanted to get this noted before we go live with the hooks.