- add an enum to handle hook types (enum are available since PHP 8.1) - change hook calls from string value to enum value