[ticket/13126] Improve the feedback when running the migrations

https://tracker.phpbb.com/browse/PHPBB3-13126

PHPBB3-13126
Could also just implement this class twice and use the write method directly instead of wrapping a closure?