protected function modifyComposer($callable)
    {
        // Begin modification of composer.json
        $composerFile = new JsonFile(Factory::getComposerFile(), null, $this->getIO());
        $composerData = $composerFile->read();

        // Note: Respect call by ref $composerData
        $result = $callable($composerData);
        if ($result === false) {
            return;
        }
        if ($result) {
            $composerData = $result;
        }

        // Update composer.json and refresh local composer instance
        $composerFile->write($composerData);
        $this->resetComposer();
    }