The LabPage class extends the Page class and serves as a playground for all the methods that need to be changed in order to get Versions properly implemented. It really helped to untangle the content vs. translation mess in a more isolated state without all the other methods. Afterwards I also took care of save/update, etc. It starts to come along really nicely, but there are still some elements missing.
Deprecated
::readContent Use ::version()->read() instead
::save Use ::version()->save() instead
::saveContent Use ::version()->save() instead
::saveTranslation Use ::version()->save() instead
::writeContent Use ::version()->save() instead
Breaking changes
::translations will now always return a Translations collection with at least the Language::single object in single language mode.
Ready?
[x] In-code documentation (wherever needed)
[x] Unit tests for fixed bug/feature
[x] Tests and checks all pass
For review team
[ ] Add changes & docs to release notes draft in Notion
This PR …
Reasoning
The LabPage class extends the Page class and serves as a playground for all the methods that need to be changed in order to get Versions properly implemented. It really helped to untangle the content vs. translation mess in a more isolated state without all the other methods. Afterwards I also took care of save/update, etc. It starts to come along really nicely, but there are still some elements missing.
Deprecated
::readContent
Use::version()->read()
instead::save
Use::version()->save()
instead::saveContent
Use::version()->save()
instead::saveTranslation
Use::version()->save()
instead::writeContent
Use::version()->save()
insteadBreaking changes
::translations
will now always return aTranslations
collection with at least theLanguage::single
object in single language mode.Ready?
For review team