[ticket/13126] Extends migrator_output_handler instead of using a closure

PHPBB3-13126