statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 71 forks source link

Update RevisionRepository.php to return object of RevisionContract type #270

Closed modrictin closed 2 months ago

ryanmitchell commented 2 months ago

Thanks. What error does this solve?

modrictin commented 2 months ago

Hey @ryanmitchell ,

If you call \Statamic\Facades\Revision::make() it will throw an error:

TypeError Statamic\Eloquent\Revisions\RevisionRepository::make(): Return value must be of type Statamic\Contracts\Revisions\Revision, string returned.

modrictin commented 2 months ago

Sorry if I acted too fast and skipped the opening of the issue :)

If I have to, I will open one.

ryanmitchell commented 2 months ago

Nope that’s fine- just wanted some context.

modrictin commented 2 months ago

I understand, thanks for everything :)