[6.x] Revision Query builder#10437
Merged
jasonvarga merged 23 commits intoNov 4, 2025
Merged
Conversation
# Conflicts: # src/Revisions/RevisionRepository.php # tests/Revisions/RepositoryTest.php
…with other repository tests
…will continue to work.
A working copy is now just a revision with an action of "working". This more inline with a database. It would be in the same table. Eloquent driver already works this way.
the id is the key and the timestamp. at least for the file implementation. since you can now do Revision::query()->get(), you'd get revisions across entries, terms, etc. So the timestamp alone isn't unique enough. the filename is essentially irrelevant now. for eloquent, the id could just be the model row id. the url continues uses the timestamp, but now its by calling timestamp explicitly, not just assuming id is the timestamp.
to avoid decisions around what querying entry data is, throw an exception for now. only support querying certain fields.
Member
|
Retargeted this to master so it can be in v6 and have (fairly minor) breaking changes. Went ahead and updated some other parts aside from the query builder too.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes revisions to work from a stache store and adds a query builder to allow revisions to be queried using the supported methods.
I've tried to implement this in a non breaking way so some of the choices are based around that.
@edalzell wanted this for some filters he's working on.