Skip to content

Releases: dvarilek/laravel-snap

v0.3.1

11 Apr 22:07
97d63c4

Choose a tag to compare

Bug Fixes

  • fix 'make-versionable' command throwing error while finding models when not specified
  • fix incorrect commands in README.md

v0.3.0

04 Apr 14:27
97d63c4

Choose a tag to compare

Breaking Changes

  • 'rewinding' and 'rewound' model events were renamed to 'reverting' and 'reverted'
  • 'rewindTo' method was renamed to 'revertTo'
  • 'latestSnapshot' and 'oldestSnapshot' orders by version instead of created_at

New Features

  • Added better versioning capabilities by storing snapshot versions and allowing the Snapshotable models to store their current versions
  • Added 'forward' and 'rewind' methods to Snapshotable trait
  • Added make-versionable command

v0.2.0-beta

26 Mar 15:25
5a8e30b

Choose a tag to compare

Major Changes

  • The package has been renamed to Laravel Snap. All previous versions are no longer supported and should be replaced with the new version.

Bug Fixes

  • Fixed encoding and decoding bug in the Snapshot Model related to attribute casting.
  • Fixed encoding of related attributes using improper attribute key when saved to storage column.

New Features

  • Added revert feature to restore a Model to a previous state from its Snapshot.
  • Added atomic locking support for snapshotting and rewinding operations.
  • Added Eloquent Model listeners for snapshotting and rewinding operations.
  • Added package Exceptions.
  • Added Github Actions.
  • Added phpstan.

Refactor

  • Some parts of documentation have been rewritten.
  • Refactored Definition ValueObjects to inherit from a common base class instead of inheriting from each other.

Future Plans

  • Add proper versioning support by implementing a way to store current model's version.
  • Support for HasOne and HasOneThrough relationships.

v0.1.0-alpha

27 Jan 22:09

Choose a tag to compare

Current Features and Capabilities

  • Capture a model's state and its belongsTo relations using a snapshot. (nesting supported)
  • Define what to capture from the model and its relations through a SnapshotDefinition.
  • Store snapshots in a JSON-like structure in a separate table using a polymorphic relation.
  • Access and manipulate snapshot attributes as if they were real model fillables.
  • Capture and store casts of captured attributes.
  • Includes tests.

Planned Features for Full Release

  • Proper documentation
  • Setting up GH actions.
  • Support for HasOne and HasOneThrough relations.
  • Rewind feature to revert the model to a previous state from snapshot. (along with its relations)