Open
Description
A more detailed plan after #9445 and now that #12129 is in we can look at this in a bit more depth.
I think it is important to make a distinction here. The implementation in #12129 is to allow version backends. Which is why we have versions in group folders for example.
This is about adding versioning support on a storage level.
I'd propose a new interface to be implemented by storages. IVersionStorage
. This should at least have a method versioningEnabled
(or something similar). Because it might not always be available (e.g. S3 versiniong).
Then this would need the following methods I think
getVersions(string $path): IVersion[]
: obtains a list of the current versionscreateVersion(string $path)
: creates a new version (this can also be a void method if that happens automatically on write?)restore(IVersion $version): bool
: restores the version
Then IVersion
needs
- size
- time
- id
- mime?
That way we could use it in combination with #12129
@icewind1991 for feedback.