-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
First of all, apologies to disregard the template. I'd like to get straight to the point on a few issues.
- Expired records are not excluded by default, which isn't expected behaviour and causes end users to hack up their own way (this should be done in the
applymethod of the scope class). - Regarding
setExpiresAtAttribute:- Setting the value of
expires_atis very weird - there's a lot of funny parsing going on when instead it should have been a simpleis_int($x) ? Carbon::now()->addSeconds($x) : $x- the current code somehow doesn't work for me in a simple test with timestamps andCarbon::setTestNow() - If the dev named the column something else the
setExpiresAtAttributecode will not be triggered for the other column name - this could be confusing/misleading
- Setting the value of
- Regarding the
Expirabletrait:- It is missing method PHPDoc (it should document the macros from
ExpiringScope). - Instead of redeclaring
@property $attributesand@property $datesin that trait, maybe use@mixin HasAttributesinstead. - Careful that even if
getSecondstrait method is protected, it could come down to some nasty incompatibility with other traits or implementing class. Same situation with importing all the methods fromInteractsWithTimetrait.
- It is missing method PHPDoc (it should document the macros from
- I'd consider better names for the macros, for example
Subscription::withoutExpirationis more idiomatic thannotExpiring.
On a different perspective, there's a competing package that solves some issues above but has its own problems.
Maybe consider partnering up to bring the best of both?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request