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, Sep 18, 5:43 PM
Unknown Object (File)
Wed, Sep 18, 11:51 AM
Unknown Object (File)
Tue, Sep 17, 1:29 PM
Unknown Object (File)
Tue, Sep 17, 10:00 AM
Unknown Object (File)
Sun, Sep 15, 10:14 AM
Unknown Object (File)
Fri, Sep 13, 8:30 AM
Unknown Object (File)
Fri, Sep 13, 8:29 AM
Unknown Object (File)
Wed, Sep 11, 6:48 AM
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