All notable changes to laravel-love
will be documented in this file.
10.0.0 - 2024-03-09
- (#258) Added Laravel 11 support
- (#240) Added
getReactionsBy
method to Reacter Facade - (#240) Added
getReactionsBy
method to Reacter Model
- (#247) Removed
ReactionCounterObserver
class - (#247) Removed
ReactionTotalObserver
class - (#248) Removed
ReactionObserver::creating
method
9.0.0 - 2023-02-24
Code has breaking changes because of Eloquent Model local scopes refactoring.
Follow upgrade instructions to migrate code.
- (#234) Added Laravel 10 support
- (#216) Added Docker Compose to quick development build
- (#227) Added
whereReactedTo
model scope to Reacterable models - (#227) Added
whereNotReactedTo
model scope to Reacterable models - (#227) Added
whereReactedToBetween
model scope to Reacterable models
- (#227) Extracted Reactable model scopes to
ReactableEloquentBuilderTrait
- (#231) Console command
love:setup-reactable
generates migration with nullable columnlove_reactant_id
by default - (#231) Console command
love:setup-reactable
option--nullable
replaced with--not-nullable
- (#231) Console command
love:setup-reacterable
generates migration with nullable columnlove_reacter_id
by default - (#231) Console command
love:setup-reacterable
option--nullable
replaced with--not-nullable
- (#233) Console command
love:recount
use default queue connection if--queue-connection
option is not defined - (#222) Removed DI usage from console commands constructors
- (#215) Migrated to console
AsCommand
attribute - (#215) Package generating anonymous class migrations now
- (#217) Switched to native typed class properties
- (#218) Switched to Symfony Console exit code constants
- (#215) Dropped PHP 7.x support
- (#215) Dropped Laravel 6 support
- (#215) Dropped Laravel 7 support
- (#215) Dropped Laravel 8 support
8.9.0 - 2022-02-23
- (#206) Added Laravel 9 support
8.8.1 - 2021-04-03
- (#197) Dropped PHP 7.1 support
8.8.0 - 2021-04-03
8.7.1 - 2020-12-06
- (#186) Improve CLI application performance by replacing
$name
with$defaultName
static property in commands - (#187) Fixed inconsistency in method parameter names
8.7.0 - 2020-12-06
- (#185) Added PHP 8.x support
8.6.1 - 2020-10-04
- (#178) Rename imported interfaces aliases
8.6.0 - 2020-10-02
- (#177) Added accessor methods to aggregates jobs
8.5.0 - 2020-09-09
- (#176) Added Laravel 8 support
8.4.0 - 2020-05-22
- (#165) Added table names configuration
- (#161) Removed redundant queues from Reactant listeners
8.3.1 - 2020-03-06
- (#158) Add Laravel 7.x support
8.3.0 - 2020-02-16
- (#146) Extracted logic from
Cog\Laravel\Love\Reactant\Listeners\IncrementAggregates
listener toCog\Laravel\Love\Reactant\Jobs\IncrementReactionAggregatesJob
- (#146) Extracted logic from
Cog\Laravel\Love\Reactant\Listeners\DecrementAggregates
listener toCog\Laravel\Love\Reactant\Jobs\DecrementReactionAggregatesJob
- (#147) Extracted event listeners registering from
Cog\Laravel\Love\LoveServiceProvider
toCog\Laravel\Love\LoveEventServiceProvider
- (#148) Extracted rebuild of reactant reactions counters from
Cog\Laravel\Love\Console\Commands\Recount
command toCog\Laravel\Love\Reactant\Jobs\RebuildReactionAggregatesJob
- (#148) Added
--queue-connection=
option tolove:recount
Artisan command
- (#148) Fixed
love:recount
Artisan command execution whenlove_reactant_reaction_totals
database table is empty - (#151) Fixed
love:recount
Artisan command return type
8.2.0 - 2020-01-30
- (#127) Artisan commands for registering existing models as reactants/reacters
8.1.2 - 2019-09-22
- (#121) Drop foreign key before database column delete
8.1.1 - 2019-09-13
- (#118) Fix custom connection in database migrations
8.1.0 - 2019-09-03
- (#113) Laravel 6 support
- (#110) Removed dependency of
RateOutOfRange
exception in contracts namespace on concreteReaction
model implementation - (#110) Renamed
withValue
method towithValueBetween
inRateOutOfRange
exception - (#110) Added
$minimumRate
parameter towithValueBetween
method inRateOutOfRange
exception - (#110) Added
$maximumRate
parameter towithValueBetween
method inRateOutOfRange
exception - (#111) Changed
$rate
parameter type fromfloat
to?float
ofhasReactedTo
method inReacter
model contract - (#111) Changed
$rate
parameter type fromfloat
to?float
ofhasNotReactedTo
method inReacter
model contract
5.3.0 - 2019-09-03
- (#114) Laravel 6 support
8.0.0 - 2019-08-08
Code has a lot of breaking changes because of new Weighted Reaction System.
Follow upgrade instructions to migrate code & database to new structure.
- Added
love:upgrade-v7-to-v8
Artisan command - (#90) Added
ReactionCounter::COUNT_DEFAULT
public constant - (#90) Added
ReactionCounter::WEIGHT_DEFAULT
public constant - (#90) Added
ReactionTotal::COUNT_DEFAULT
public constant - (#90) Added
ReactionTotal::WEIGHT_DEFAULT
public constant - (#91) Added
Reaction::RATE_DEFAULT
public constant - (#91) Added
Reaction::RATE_MIN
public constant - (#91) Added
Reaction::RATE_MAX
public constant - (#91) Added
ReactionType::MASS_DEFAULT
public constant - (#91) Added
rate
attribute toReacter
model - (#91) Added
rate DECIMIAL(4, 2)
column tolove_reactions
db table - (#91) Added ability to call
Reacter::reactTo
with already reacted reactant, same reaction type, but onlyrate
differs - (#91) Added
Cog\Contracts\Love\Reaction\Exceptions\RateOutOfRange
exception - (#100) Added
Cog\Contracts\Love\Reaction\Exceptions\RateInvalid
exception - (#96) Added progress bar to
love:recount
Artisan command - (#97) Added ability to call
Reactable::joinReactionCounterOfType
more than once - (#102) Added
scopeWhereNotReactedBy
scope toReactable
model trait
- (#79) Renamed
isReactedTo
method tohasReactedTo
inReacter
model contract - (#79) Added
$reactionType
parameter tohasReactedTo
inReacter
model contract - (#91) Added
$rate
parameter tohasReactedTo
method inReacter
model contract - (#91) Added
$rate
parameter tohasReactedTo
method inReacter
facade contract - (#79) Renamed
isNotReactedTo
method tohasNotReactedTo
inReacter
model contract - (#79) Added
$reactionType
parameter tohasNotReactedTo
inReacter
model contract - (#91) Added
$rate
parameter tohasNotReactedTo
method inReacter
model contract - (#91) Added
$rate
parameter tohasNotReactedTo
method inReacter
facade contract - (#79) Added
$reactionType
parameter toisReactedBy
inReactant
model contract - (#91) Added
$rate
parameter toisReactedBy
method inReactant
model contract - (#91) Added
$rate
parameter toisReactedBy
method inReactant
facade contract - (#79) Added
$reactionType
parameter toisNotReactedBy
inReactant
model contract - (#91) Added
$rate
parameter toisNotReactedBy
method inReactant
model contract - (#91) Added
$rate
parameter toisNotReactedBy
method inReactant
facade contract - (#83) Artisan command
love:reaction-type-add
awaits options instead of arguments - (#87) Resolving models default attributes values moved from accessors to Eloquent methods
- (#88) Renamed
weight
attribute tomass
inReactionType
model - (#88) Renamed
getWeight
method togetMass
inReactionType
model contract - (#89) Added
$reactionType
parameter toscopeWhereReactedBy
method inReactable
model trait - (#90) Moved
count
&weight
attributes default values ofReactionCounter
to application level - (#90) Moved
count
&weight
attributes default values ofReactionTotal
to application level - (#91) Changed
getWeight
method return type fromint
tofloat
in reactant'sReactionCounter
model contract - (#91) Changed
$amount
parameter type fromint
tofloat
ofincrementWeight
method in reactant'sReactionCounter
model contract - (#91) Changed
$amount
parameter type fromint
tofloat
ofdecrementWeight
method in reactant'sReactionCounter
model contract - (#91) Changed
getWeight
method return type fromint
tofloat
in reactant'sReactionTotal
model contract - (#91) Changed
$amount
parameter type fromint
tofloat
ofincrementWeight
method in reactant'sReactionTotal
model contract - (#91) Changed
$amount
parameter type fromint
tofloat
ofdecrementWeight
method in reactant'sReactionTotal
model contract - (#91) Added
?float $rate
parameter toreactTo
method inReacter
facade contract - (#91) Added
?float $rate
parameter toreactTo
method inReacter
model contract - (#91) Added
getRate
method toReaction
model contract - (#91) Changed
getWeight
method return type fromint
tofloat
inReaction
model contract - (#91) Changed
weight
column type toDECIMIAL(13, 2)
inlove_reactant_reaction_counters
db table - (#91) Changed
weight
column type toDECIMIAL(13, 2)
inlove_reactant_reaction_totals
db table - (#96) Changed signature of
love:recount
Artisan command tolove:recount {--model=} {--type=}
- (#99) Make
Reacterable
parameter nullable inisReactedBy
method ofReactant
facade contract - (#99) Make
Reacterable
parameter nullable inisNotReactedBy
method ofReactant
facade contract - (#102) Changed second parameter type from
Reactant
toReacterable
inscopeWhereReactedBy
method ofReactable
model trait - (#102) Changed third parameter type from
?ReactionType
to?string
inscopeWhereReactedBy
method ofReactable
model trait - (#97) Added third
?string $alias
parameter toscopeJoinReactionCounterOfType
method ofReactable
model trait - (#102) Added second
?string $alias
parameter toscopeJoinReactionTotal
method ofReactable
model trait - (#102) Renamed virtual column
reactions_count
toreaction_{$type}_count
inscopeJoinReactionCounterOfType
method ofReactable
model trait - (#102) Renamed virtual column
reactions_weight
toreaction_{$type}_weight
inscopeJoinReactionCounterOfType
method ofReactable
model trait - (#102) Renamed virtual column
reactions_total_count
toreaction_total_count
inscopeJoinReactionTotal
method ofReactable
model trait - (#102) Renamed virtual column
reactions_total_weight
toreaction_total_weight
inscopeJoinReactionTotal
method ofReactable
model trait
- (#86) Laravel 5.6 support obsolete
- (#79) Removed
isReactedToWithType
method fromReacter
model contract - (#79) Removed
isNotReactedToWithType
method fromReacter
model contract - (#79) Removed
isReactedByWithType
method fromReactant
model contract - (#79) Removed
isNotReactedByWithType
methodReactant
model contract - (#89) Removed
scopeWhereReactedByWithType
method fromReactable
model trait
7.2.1 - 2019-07-11
- (#77) Fixed Null Objects iterable return type inconsistency
7.2.0 - 2019-07-01
- (#72) Default migrations loading configuration
7.1.0 - 2019-06-23
- (#68) Database connection configuration
7.0.1 - 2019-06-22
- (#70)
isReactedTo
&isNotReactedTo
methods names ofReacter
facade were changed tohasReactedTo
&hasNotReactedTo
7.0.0 - 2019-06-22
- (#54)
Reacter
&Reactant
facades viaLoveReacter
method toReacterable
trait & contractviaLoveReactant
method toReactable
trait & contract
- (#67)
Cog\Laravel\Love\Facades\Love
global facade
6.2.1 - 2019-06-14
- (#58) Fix
--model
option oflove:setup-reacterable
&love:setup-reactable
Artisan commands
6.2.0 - 2019-06-14
- (#56)
love:setup-reacterable
&love:setup-reactable
Artisan commands were added
6.1.0 - 2019-05-07
- (#51)
love:reaction-type-add
Artisan command was added
6.0.1 - 2019-03-05
- (#47) Removed duplicating indexes for foreign keys
6.0.0 - 2019-02-25
Package API was refactored from a scratch. Code has a lot of breaking changes and cannot be updated easily.
Follow upgrade instructions to migrate database to new structure.
- Laravel 5.8 support
ReactionType
modelReacter
modelReactant
modelReactionTotal
modelReactionHasBeenAdded
eventReactionHasBeenRemoved
eventlove_reacters
database table was addedlove_reactants
database table was addedlove_reaction_types
database table was addedlove_reactant_reaction_totals
database table was added
Liker
trait replaced withReacterable
Likeable
trait replaced withReactable
LikeCounter
model replaced withReactionCounter
love_likes
database table was replaced withlove_reactions
love_like_counters
database table was replaced withlove_reactant_reaction_counters
ReactionCounter
updates on background using queueReactionTotal
updates on background using queue
- Laravel 5.5 support obsolete
- PHP < 7.1.3 support obsolete
LikeableWasLiked
event was removedLikeableWasDisliked
event was removedLikeableWasUnliked
event was removedLikeableWasUndisliked
event was removed
5.2.0 - 2018-09-09
- (#21) Laravel 5.7 support
5.1.1 - 2018-02-16
- (#11) Added missing migrations auto-loading
5.1.0 - 2018-02-08
- (#9) Laravel 5.6 support
5.0.0 - 2018-01-16
- Added
Cog\Contracts\Love\Liker\Models\Liker
contract with methodslike
,dislike
,unlike
,undislike
,toggleLike
,toggleDislike
,hasLiked
,hasDisliked
- Method
like
renamed tolikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
dislike
renamed todislikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
unlike
renamed tounlikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
undislike
renamed toundislikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
liked
renamed tolikedBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
disliked
renamed todislikedBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
likeToggle
renamed totoggleLikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract - Method
dislikeToggle
renamed totoggleDislikeBy
inCog\Contracts\Love\Likeable\Models\Likeable
contract
4.0.0 - 2018-01-04
- Console command
LikeableRecount
moved fromCog\Likeable\Console
toCog\Laravel\Love\Console\Commands
namespace - Console command
LikeableRecount
renamed toRecount
- Contracts moved from
Cog\Likeable\Contracts
toCog\Contracts\Love
namespace - Database table
like
renamed tolove_likes
- Database table
like_counter
renamed tolove_like_counters
- Database table column
updated_at
was added tolove_likes
table - Database table columns
created_at
&updated_at
were added tolove_like_counters
table - Events were moved from
Cog\Likeable\Events
toCog\Laravel\Love\Likeable\Events
namespace - Event
ModelWasDisliked
renamed toLikeableWasDisliked
- Event
ModelWasLiked
renamed toLikeableWasLiked
- Event
ModelWasUndisliked
renamed toLikeableWasUndisliked
- Event
ModelWasUnliked
renamed toLikeableWasUnliked
- All Likeable's events public property
$model
was renamed to$likeable
- Constant values
LikeType::LIKE
&LikeType::DISLIKE
are uppercase now and equal toLIKE
&DISLIKE
respectively - Exceptions extends
\RuntimeException
instead of\Exception
- Exception
LikeTypeInvalidException
moved fromCog\Likeable\Contracts\Exceptions
toCog\Contracts\Love\Like\Exceptions
- Exception
LikeTypeInvalidException
renamed toInvalidLikeType
- Exception
LikerNotDefinedException
moved fromCog\Likeable\Contracts\Exceptions
toCog\Contracts\Love\Liker\Exceptions
- Exception
LikerNotDefinedException
renamed toInvalidLiker
- Exception
ModelInvalidException
moved fromCog\Likeable\Contracts\Exceptions
toCog\Contracts\Love\Likeable\Exceptions
- Exception
ModelInvalidException
renamed toInvalidLikeable
- Observer class
ModelObserver
moved fromCog\Likeable\Observers
toCog\Laravel\Love\Likeable\Observers
namespace - Observer class
ModelObserver
renamed toLikeableObserver
- Service Provider
LikableServiceProvider
was moved fromCog\Likeable\Providers
toCog\Laravel\Love\Providers
namespace - Service Provider
LikableServiceProvider
was renamed toLoveServiceProvider
- Removed deprecated
Cog\Likeable\Contracts\HasLikes
contract - Removed deprecated
Cog\Likeable\Traits\HasLikes
trait - Removed
scopeWhereLikedBy
method fromCog\Contracts\Love\Likeable\Services\LikeableService
contract - Removed
scopeWhereLikedBy
method fromCog\Laravel\Love\Likeable\Services\LikeableService
class - Removed
scopeOrderByLikesCount
method fromCog\Contracts\Love\Likeable\Services\LikeableService
contract - Removed
scopeOrderByLikesCount
method fromCog\Laravel\Love\Likeable\Services\LikeableService
class - Removed
getLikesCountAttribute
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
getDislikesCountAttribute
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
getLikedAttribute
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
getDislikedAttribute
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
getLikesDiffDislikesCountAttribute
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
scopeWhereLikedBy
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
scopeWhereDislikedBy
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
scopeOrderByLikesCount
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract - Removed
scopeOrderByDislikesCount
method fromCog\Contracts\Love\Likeable\Models\Likeable
contract
3.1.0 - 2017-12-28
- Checks if model liked by user will try to search in eager loaded relations first
3.0.0 - 2017-08-24
- Laravel 5.5 support
- Laravel Package Auto-Discovery support
- Eloquent related method
getKey
&getMorphClass
added toCog\Likeable\Contracts\Likeable
contract collectLikers
,collectDislikers
&scopeOrderByDislikesCount
methods added toCog\Likeable\Contracts\Likeable
contractcollectLikersOf
&collectDislikersOf
methods toCog\Likeable\Contracts\LikeableService
contract
Cog\Likeable\Contracts
contract renamed toCog\Likeable\Contracts\Likeable
Cog\Likeable\Traits\HasLikes
trait renamed toCog\Likeable\Traits\Likeable
2.2.5 - 2017-07-10
- Event observing of custom
Like
model (#18)
2.2.4 - 2017-04-20
orderByDislikesCount
scope added toHasLikes
traitscopeOrderByLikesCount
method toLikeableService
orderByLikesCount
count only likes now
2.2.3 - 2017-04-20
orderByLikesCount
work in MySQL databases
2.2.2 - 2017-04-09
orderByLikesCount
returns models without likes too
2.2.1 - 2017-04-09
orderByLikesCount
database query fixed
2.2.0 - 2017-04-09
Article::orderByLikesCount('asc')
scope for the model. Usesdesc
as default order direction
2.1.0 - 2017-02-20
- Laravel 5.4 support.
2.0.1 - 2017-01-11
- Removed unused properties in
LikeObserver
(#12) - Foreign key in migration commented out (#11)
2.0.0 - 2016-09-11
- Renamed
FollowableService
methods to follow code style consistency:incrementLikeCount()
toincrementLikesCount()
decrementLikeCount()
todecrementLikesCount()
decrementDislikeCount()
todecrementDislikesCount()
incrementDislikeCount()
toincrementDislikesCount()
1.1.2 - 2016-09-07
- Fix enum like types
1.1.1 - 2016-09-07
- Fix likeable enums database default value
1.1.0 - 2016-09-07
- Renamed
HasLikes
trait methods to follow code style consistency:likeCounter()
tolikesCounter()
dislikeCounter()
todislikesCounter()
- Initial release