Add getPriority to lifecycle event callbacks to control execution order.