protected function mergeComposerJsonFiles(string $composer_file, \stdClass $original_composer, \stdClass $new_composer, callable $callback = NULL) {
    $new_composer = $this->mergeComposerObjects($original_composer, $new_composer, $callback);
    $composer_content = file_get_contents($composer_file);
    $replace_composer = json_decode($composer_content);
    $changes = $this->calculateRequirementChanges($replace_composer, $new_composer);
    if (file_put_contents($composer_file, json_encode($new_composer, JSON_PRETTY_PRINT)) !== FALSE) {
      return $changes;
    }
  }