Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented May 22, 2025

Summary

Proper replacement for deprecated OC_Util::getUserQuota. Also we still use this in some cases we can now replace, moreover it just makes sense to have a machine readable format in the API instead of only the human readable format which is less precise. Aligns also with getQuota of the quota storage, which already returned the machine readable format.

Checklist

Proper replacement for deprecated `OC_Util::getUserQuota`.
Also we still use this in some cases we can now replace, moreover it
just makes sense to have a machine readable format in the API instead of
only the human readable format which is less precise.
Alings also with `getQuota` of the quota storage, which already returned
the machine readable format.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added this to the Nextcloud 32 milestone May 22, 2025
@susnux susnux added enhancement 3. to review Waiting for reviews pending documentation This pull request needs an associated documentation update labels May 22, 2025
@susnux susnux marked this pull request as ready for review May 22, 2025 11:35
@susnux susnux requested a review from a team as a code owner May 22, 2025 11:35
@susnux susnux requested review from ArtificialOwl, come-nc, icewind1991, provokateurin, skjnldsv and yemkareems and removed request for a team and ArtificialOwl May 22, 2025 11:35
Comment on lines +872 to +873
$this->assertEquals('1 GB', $user->getQuota());
$this->assertEquals(1024 * 1024 * 1024, $user->getQuotaBytes());
Copy link
Contributor

Choose a reason for hiding this comment

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

But that’s 1 GiB, not 1 GB 🙀

Copy link
Member

Choose a reason for hiding this comment

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

I really dislike that we have this 🙈

@provokateurin provokateurin merged commit fb4a06f into master May 22, 2025
208 of 214 checks passed
@provokateurin provokateurin deleted the feat/user-get-quota-bytes branch May 22, 2025 15:29
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
joshtrichards added a commit that referenced this pull request Dec 1, 2025
Formally deprecated with 9.0.0 and we dropped final uses of it in #53045.

Signed-off-by: Josh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement pending documentation This pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants