Page MenuHomePhorge

Per-plan trial period
ClosedPublic

Authored by machniak on Sep 13 2022, 11:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 9:43 AM
Unknown Object (File)
Wed, Apr 10, 1:05 AM
Unknown Object (File)
Wed, Apr 10, 12:33 AM
Unknown Object (File)
Fri, Apr 5, 6:38 AM
Unknown Object (File)
Feb 10 2024, 7:08 AM
Unknown Object (File)
Feb 9 2024, 4:44 PM
Unknown Object (File)
Jan 29 2024, 12:42 PM
Unknown Object (File)
Jan 24 2024, 4:04 PM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK385cdbd81e81: Per-plan trial period
Summary

Per-plan lite period
Don't send end-of-trial notifications if free_months != 1

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Branch
dev/plan-free-period
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 40082
Build 16238: arc lint + arc unit

Event Timeline

machniak created this revision.

Looks good to me.

src/app/Observers/EntitlementObserver.php
130

Why are we doing this? A comment would be helpful.

src/app/Wallet.php
105

This does not seem problematic to me, we're just bumping updated_at to the first point in time where we have to check it again, no?
Also, $apply is the dry run, so we're not bumping it then?

src/app/Observers/EntitlementObserver.php
130

Below we calculate the price using updated_at timestamp.

src/app/Wallet.php
105

$apply=false is dry-run.
My idea regarding the comment was to never have updated_at in the future. This way it would be more in sync with life. It's "updated at" not "valid until". It is not really a problem right now, though.

This revision is now accepted and ready to land.Sep 14 2022, 3:42 PM
This revision was automatically updated to reflect the committed changes.