Skip to content

Commit

Permalink
minor db and type fixes (#39)
Browse files Browse the repository at this point in the history
* fix: s/created/added/

* fix: cast version to string, as it's sometimes numeric
  • Loading branch information
chuckadams authored Dec 6, 2024
1 parent efa848f commit 48888ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Services/List/AbstractListService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function preserveRevision(): string
$revision = $this->currentRevision[$name]['revision'];
$this->em->getConnection()->insert(
'revisions',
['action' => $name, 'revision' => $revision, 'created' => time()]
['action' => $name, 'revision' => $revision, 'added' => time()]
);
return (string) $revision;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Metadata/AbstractMetadataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function saveOpen(array $metadata): void
'slug' => mb_substr($metadata['slug'], 0, 255),
'name' => mb_substr($metadata['name'], 0, 255),
'status' => 'open',
'version' => mb_substr($metadata['version'], 0, 32),
'version' => mb_substr((string) $metadata['version'], 0, 32),
'origin' => $this->origin,
'updated' => strtotime($metadata['last_updated'] ?? 'now'),
'pulled' => time(),
Expand Down

0 comments on commit 48888ff

Please sign in to comment.