Skip to content

Releases: rmasters/culpa

v0.6.0

02 Nov 13:15
Compare
Choose a tag to compare

Fixes a few bugs and enables Laravel 4.1 support.

Dependency bump, fixed Laravel dependency

08 Oct 20:48
Compare
Choose a tag to compare

Swear I already did the 4.0.5 -> 4.0.x version fix but whatevs.

Fixed composer downloads

23 Aug 21:26
Compare
Choose a tag to compare

Now depends on 4.0.x for Illuminate packages, which was probably breaking installs on Laravel 4.0.5.

PHP 5.3 support

25 Jul 09:59
Compare
Choose a tag to compare

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:

  1. 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);
    
  2. 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

12 Jul 11:57
Compare
Choose a tag to compare
v0.2.1 Pre-release
Pre-release

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.