public function removeComposerPatch($package, $url) {
    $composer_json = $this->getComposerJson();
    if (!empty($composer_json['extra']['patches'][$package])) {
      foreach ($composer_json['extra']['patches'][$package] as $key => $patch_url) {
        if ($patch_url == $url) {
          unset($composer_json['extra']['patches'][$package][$key]);
          // If that was the only patch for this module, unset the parent too.
          if (empty($composer_json['extra']['patches'][$package])) {
            unset($composer_json['extra']['patches'][$package]);
          }
          $this->writeComposerJson($composer_json);

          return TRUE;
        }
      }
    }
    return FALSE;
  }