I don't see why archive itself couldn't do that on the fly? It should be
modified inside the archive only obviously, not in your project's
composer.json.