Skip to content

Commit

Permalink
Fixed category on the remote repository to be an attribute instead of…
Browse files Browse the repository at this point in the history
… a new tag
  • Loading branch information
retroluxfilm authored and retroluxfilm committed Feb 19, 2022
1 parent 1b2e801 commit 17e97c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Package/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ public function createRemotePackageDescriptor(): RemotePackageDescriptor
// set category if defined
$category = $this->packageXML->getCategory();
if(!empty($category)){
$remote->appendChild($xml->createElement(RemotePackageDescriptor::TAG_CATEGORY, $category));
$remote->setAttribute(RemotePackageDescriptor::ATTRIBUTE_CATEGORY, $category);
}


$xml->appendChild($remote);

return new RemotePackageDescriptor($remote);
Expand Down
6 changes: 3 additions & 3 deletions src/Repository/RemotePackageDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class RemotePackageDescriptor
TAG_REMOTE = "remote",
TAG_PICTURE = "picture",
TAG_DESCRIPTION = "description",
TAG_URL = "url",
TAG_CATEGORY = "category";
TAG_URL = "url";
/**
* Attributes of the remote package descriptor
*/
Expand All @@ -47,7 +46,8 @@ class RemotePackageDescriptor
ATTRIBUTE_FILE = "file",
ATTRIBUTE_BYTES = "bytes",
ATTRIBUTE_MD5 = "md5sum",
ATTRIBUTE_CHECKSUM = "checksum";
ATTRIBUTE_CHECKSUM = "checksum",
ATTRIBUTE_CATEGORY = "category";

/**
* remote xml element to fetch data from
Expand Down

0 comments on commit 17e97c6

Please sign in to comment.