Open lupoair opened 8 years ago
Hi @lupoair - Revisionable is compatible with the latest releases of Laravel, as well as 4.2. In regard to the first ticket, I've asked for more information - but I can confirm on my 5.2 install, revisions are working on all my models as expected.
207 is just a documentation issue for the migration, which will be addressed in the docs soon.
We are contemplating splitting Laravel 4.x support out into it's own branch to continue the development of this project for 5.x and above.
is this compatible with laravel 5.3 ?
Hi @naveensnayak,
Yeah it is working with Laravel 5.3 for me.
Laravel 5.4 also seems to work but you have to change the events in a slightly different way than described in the readme:
// app/Providers/EventServiceProviders.php
public function boot(DispatcherContract $events)
{
parent::boot($events);
$events->listen('revisionable.*', function($eventName, $data) {
// $eventName = revisionable.created, revisionable.saved or revisionable.deleted
// $data['model']
// $data['revisions']
});
}
Laravel 5.4
public function boot()
{
parent::boot();
Event::listen('revisionable.*', function($model, $revisions) {
// Do something with the revisions or the changed model.
dd($model, $revisions);
});
}
some things dont work on laravel 5.8
Events
The
fire
method (which was deprecated in Laravel 5.4) of theIlluminate/Events/Dispatcher
class has been removed. You should use the dispatch method instead.Testing
The
setUp
andtearDown
methods now require a void return type: https://laravel.com/docs/5.8/upgrade
Can anybody state the compatibilty of Revisionable and the latest Laravel or LTS?
I think this should also be documented by rule.
209 states it doesn't work with standard 5.2 user model.
While pull request #207 offers little help with migrations.
What is the overall state of this project?