Releases: rmasters/culpa
v0.6.0
Dependency bump, fixed Laravel dependency
Swear I already did the 4.0.5
-> 4.0.x
version fix but whatevs.
Fixed composer downloads
Now depends on 4.0.x
for Illuminate packages, which was probably breaking installs on Laravel 4.0.5.
PHP 5.3 support
This release moves the event logic into a model observer and away from the Blameable
trait, allowing for PHP 5.3 compatibility. The follpowing backwards-incompatible changes need to be made:
-
You need to add a model observer to any blameable models. All users need to do this as it's functionality that has been removed from the Blameable trait. This is as simple as adding a line of code after your class definition:
class Comment extends Model { protected $blameable = array('created'); } Comment::observe(new Culpa\BlameableObserver);
-
Traits (5.4+) now only provide convenience accessor methods for relationships. You can remove the Blameable trait and add the following traits as required:
// Adds createdBy() { return $this->belongsTo($model); } use Culpa\CreatedBy; // Adds updatedBy() { return $this->belongsTo($model); } use Culpa\UpdatedBy; // Adds deletedBy() { return $this->belongsTo($model); } use Culpa\DeletedBy; // Adds isBlameable($event) method - rarely needed use Culpa\Blameable;
5.3 users must define these methods as appropriate.
v0.2.1
Added support for configuring the user models, making this useful for anyone who has a model or Auth system other than the standard Laravel ones - see the README for details.
Fixes a commit in v0.2.0 that broke the relationship accessors.
Culpa is still a pre-release, however it's being used in a actively developed project.