You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivated by #395 it would be useful to be able to specify the proximity of Lifecycle hooks not only at implementation time - through overriding the proximity method - but also at specification time. This would for example allow to influence the order in which lifecycle hooks are executed in regard to lifecycle methods (@BeforeProperty etc.)
Suggested Solution
Implement attribute proximity to AddLifecycleHook annotation which will translate the proximity to the hooks proximity.
Discussion
This is not as straightforward as it sounds, because different hooks have different proximities.
E.g. AroundPropertyHook has just aroundPropertyProximity() and AroundContainerHook has three different proximity values. Moreover, a single lifecycle hook implementation can implement more than one lifecycle hook. Therefore, a single attribute like proximity may not suffice.
The text was updated successfully, but these errors were encountered:
This is true... Maybe something like a @HookProximity annotation is the way to go in order to set it. If no hook is specified it could, by default set a proximity for all of them.... and if it can be set on both method and on the class it would allow for pretty great control.
Testing Problem
Motivated by #395 it would be useful to be able to specify the proximity of Lifecycle hooks not only at implementation time - through overriding the proximity method - but also at specification time. This would for example allow to influence the order in which lifecycle hooks are executed in regard to lifecycle methods (
@BeforeProperty
etc.)Suggested Solution
Implement attribute
proximity
toAddLifecycleHook
annotation which will translate the proximity to the hooks proximity.Discussion
This is not as straightforward as it sounds, because different hooks have different proximities.
E.g.
AroundPropertyHook
has justaroundPropertyProximity()
andAroundContainerHook
has three different proximity values. Moreover, a single lifecycle hook implementation can implement more than one lifecycle hook. Therefore, a single attribute likeproximity
may not suffice.The text was updated successfully, but these errors were encountered: