Skip to content

[stable35] fix: use getMetadataByNodeId instead of deprecated getMetadata - #20008

Open
sudormant wants to merge 1 commit into
stable35from
fix/19954/PsalmFailingGetMetadata
Open

sudormant wants to merge 1 commit into
stable35from
fix/19954/PsalmFailingGetMetadata

Conversation

@sudormant

Copy link
Copy Markdown
Contributor

☑️ Resolves

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

Signed-off-by: Christian Lorang <christian.lorang@nextcloud.com>
@sudormant sudormant added this to the ⛅ Next Patch (35) milestone Oct 26, 2026
@sudormant sudormant self-assigned this Oct 26, 2026
@github-actions github-actions Bot changed the title fix: use getMetadataByNodeId instead of deprecated getMetadata [stable35] fix: use getMetadataByNodeId instead of deprecated getMetadata Oct 26, 2026
try {
$this->cachePhotosSize($fileId, $this->filesMetadataManager->getMetadata($fileId, true));
$fileNode = $this->rootFolder->getFirstNodeById($fileId);
$this->cachePhotosSize($fileId, $this->filesMetadataManager->getMetadataForNode($fileNode));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks when the Nextcloud server was not updated. I outlined that in the issue?

Might be easier to simply add the problem to the psalm baseline

@sudormant

Copy link
Copy Markdown
Contributor Author

getMetadataByNodeId is in server/stable35
see also nextcloud/server#65921

@sudormant
sudormant marked this pull request as ready for review October 26, 2026 09:22

@nickvergessen nickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getMetadataForNode does not exist on 35.0.0 as per the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants