diff --git a/.changes/unreleased/Added-20240823-151742.yaml b/.changes/unreleased/Added-20240823-151742.yaml new file mode 100644 index 0000000..fab598d --- /dev/null +++ b/.changes/unreleased/Added-20240823-151742.yaml @@ -0,0 +1,3 @@ +kind: Added +body: 'introduces new ManifestFactory methods: toSbomJson and toSbomXml' +time: 2024-08-23T15:17:42.531028987Z diff --git a/src/Composer/ManifestFactory.php b/src/Composer/ManifestFactory.php index 5cf3139..bd3f7cd 100644 --- a/src/Composer/ManifestFactory.php +++ b/src/Composer/ManifestFactory.php @@ -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); + } }