Skip to content

Commit

Permalink
introduces new ManifestFactory methods: toSbomJson and toSbomXml
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Aug 23, 2024
1 parent 970a6b4 commit 2243a8d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20240823-151742.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: 'introduces new ManifestFactory methods: toSbomJson and toSbomXml'
time: 2024-08-23T15:17:42.531028987Z
16 changes: 16 additions & 0 deletions src/Composer/ManifestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,20 @@ public function toSbom(string $format, string $specVersion): ?string
};
return self::create(new SbomManifestBuilder($normalizer, $this->boxVersion, $this->boxManifestVersion), $this->config, false);
}

/**
* @since Release 4.0.0
*/
public function toSbomJson(string $specVersion): ?string
{
return $this->toSbom('json', $specVersion);
}

/**
* @since Release 4.0.0
*/
public function toSbomXml(string $specVersion): ?string
{
return $this->toSbom('xml', $specVersion);
}
}

0 comments on commit 2243a8d

Please sign in to comment.