This task is the PHP counterpart of T235502. The coding conventions explicitly forbid dynamic message keys (1, 2), so it would be good to find and flag them automatically.
Open question: what format(s) should we accept for listing possible message keys (T338091#8900888)? Cfr. eslint implementation.