Use convertExtensionToRegistration.php for the initial pass.
This will eventually get us nice things as the Config infrastructure is refined. Also, it will be good for code hygiene and will help other devs understand our repos.
Try to fix T94477 in the process of doing this.
Unsuccessful automatic migration:
CentralNotice: https://gerrit.wikimedia.org/r/#/c/186899/