Page MenuHomePhorge

Asynchronous charging of deleted entitlements
ClosedPublic

Authored by machniak on Dec 4 2023, 11:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 5, 8:33 PM
Unknown Object (File)
Wed, Jun 5, 4:49 PM
Unknown Object (File)
Wed, Jun 5, 1:25 PM
Unknown Object (File)
Wed, Jun 5, 3:15 AM
Unknown Object (File)
Tue, Jun 4, 11:26 PM
Unknown Object (File)
Tue, Jun 4, 3:06 PM
Unknown Object (File)
Tue, Jun 4, 6:06 AM
Unknown Object (File)
Sun, Jun 2, 7:19 PM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK7cf045ae80e9: Asynchronous charging of deleted entitlements
Summary

Cost calculation unification, more tests

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
mollekopf subscribed.
mollekopf added inline comments.
src/app/Observers/EntitlementObserver.php
82

So you think this is here to trigger an update job via the listener? Could be, it was added here: 66f0930de7bb3db29a5ead4148c96b3f38f8d370 (for ldap backend support)

This deserves at least a comment though, it's a very in-transparent way to trigger an update job.

src/app/Wallet.php
120

Degraded pays nothing makes sense, the rest of the sentence I don't understand.

127

Seems like we can end up with negative profit here? $cost - $fee should probably be at minimum 0?

591

Avoid string interpolation for methods if possible. I know, personal preference, but IMO there are only very few places where obscuring which function you are calling and making it inaccessible to tools really is a good trade off.

674

Seems good enough from my POV.

This revision is now accepted and ready to land.Dec 10 2023, 8:17 AM
vanmeeuwen added inline comments.
src/app/Observers/EntitlementObserver.php
82

I think this is a circumvention for the bubbling of an \App\User::delete() on to its individual \App\User::entitlements() getting deleted in its observer.

src/app/Wallet.php
120

Yes, we always get money from the tenant.

machniak added inline comments.
src/app/Wallet.php
120

Customer pays nothing, but see $profit. We get the fee from the tenant.

  • Merge branch 'master' into dev/entitlement-delete-changes
  • Fixes
This revision is now accepted and ready to land.Dec 20 2023, 4:20 PM
  • No string interpolation for methods, CS fixes
This revision is now accepted and ready to land.Dec 21 2023, 12:02 PM