The closure type hint has been removed in I6bff7e4a95716ef63aa7e07d3d9fef6d20eb65a6 but remains in 1.21.
Additionally, it looks like it is causing trouble for some people even where php is supposed to support it: https://www.mediawiki.org/wiki/Thread:Project:Support_desk/PHP_Catchable_fatal_error_on_new_installation_:_Argument_1_passed_to_ScopedCallback::_construct%28%29_must_be_an_instance_of_Closure
This patch may need to be backported.
Version: 1.22.0
Severity: normal