Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump max-version of PHP to 8.4 #1427

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www
<repository type="git">https://github.com/nextcloud/notes.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot>
<dependencies>
<php min-version="8.0" max-version="8.3"/>
<php min-version="8.0" max-version="8.4"/>
<nextcloud min-version="28" max-version="31"/>
</dependencies>
<repair-steps>
Expand Down
4 changes: 2 additions & 2 deletions lib/AppInfo/DashboardWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getWidgetButtons(string $userId): array {
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
$notes = $this->notesService->getTopNotes($userId);
$notes = array_slice($notes, 0, $limit);
return array_map(function (Note $note) {
return array_values(array_map(function (Note $note): WidgetItem {
$excerpt = '';
try {
$excerpt = $note->getExcerpt();
Expand All @@ -109,7 +109,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7):
? $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg'))
: $this->getIconUrl();
return new WidgetItem($note->getTitle(), $excerpt, $link, $icon, (string)$note->getModified());
}, $notes);
}, $notes));
}

public function getIconUrl(): string {
Expand Down
4 changes: 4 additions & 0 deletions lib/Service/TagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public function __construct(ITagManager $tagManager) {
$this->tagger = $tagManager->load('files');
}

/**
* @param list<int> $fileIds
* @return void
*/
public function loadTags(array $fileIds) : void {
$this->cachedTags = $this->tagger->getTagsForObjects($fileIds);
}
Expand Down