Manual:ConvertExtensionToRegistration.php

Details
convertExtensionToRegistration file is a maintenance script, which helps you migrating skins and extensions from PHP entry points to a JSON metadata file. If your extension supports older versions of MediaWiki, you should keep your PHP entry point FooBar/FooBar.php until you drop support for those older versions

Examples
php maintenance/convertExtensionToRegistration.php extensions/BugtrackerStatus/BugtrackerStatus.php

This writes the contents of the entry point BugtrackerStatus.php into an extension.json file. Afterwards, you might still want to manually clean up the BugtrackerStatus.php file as detailed on Manual:Extension_registration.

Options
Usage: php convertExtensionToRegistration.php [ ]

Arguments: Location to the PHP entry point you wish to convert

Options: --skin     Whether to write to skin.json; use this option for converting a skin!