Instead of automatically overwriting controller.php, if the changes are still required in 5.6, show them as instructions instead