Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes 10: New MemoryContentStorageHandler #6457

Merged
merged 15 commits into from
Jun 24, 2024

Conversation

bastianallgeier
Copy link
Member

@bastianallgeier bastianallgeier commented May 22, 2024

This PR …

Features

  • New MemoryContentStorageHandler class (see outlook for details what this class is supposed to do)

Refactor

  • Move ::write and ::ensure into ContentStorageHandler class and make them abstract
  • Turn ContentStorageHandler::update and ContentStorageHandler::create into non-abstract methods that use ::write under the hood.
  • Use ContentStorageHandler::ensure in Version::ensure

Outlook

  • The new MemoryContentStorageHandler class will be used in ModelWithContent::setContent and ModelWithContent::setTranslation. It will replace the PlainTextContentStorageHandler instance with an in-memory version of the content or translation that is passed via array. This will (hopefully) keep our virtual pages, files and users working, while still making use of the underlying storage implementation. It should also help to untie the content vs. translations knot.

Breaking changes

None

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and checks all pass

For review team

  • Add changes & docs to release notes draft in Notion

@distantnative

This comment was marked as outdated.

@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 5c068b0 to 830c673 Compare May 22, 2024 12:53
@bastianallgeier bastianallgeier changed the base branch from v5/develop to v5/changes/remove-content-storage May 22, 2024 12:53
@bastianallgeier

This comment was marked as outdated.

@bastianallgeier bastianallgeier force-pushed the v5/changes/remove-content-storage branch from 0ce9960 to 6d90668 Compare June 5, 2024 10:33
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 5ed3059 to 524947f Compare June 5, 2024 10:36
@bastianallgeier bastianallgeier force-pushed the v5/changes/remove-content-storage branch from 6d90668 to 990f8b5 Compare June 11, 2024 10:17
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 524947f to b8c2327 Compare June 11, 2024 10:19
@bastianallgeier bastianallgeier force-pushed the v5/changes/remove-content-storage branch from 990f8b5 to af2e3d2 Compare June 11, 2024 14:15
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from b8c2327 to 147e4b1 Compare June 11, 2024 14:15
@bastianallgeier bastianallgeier force-pushed the v5/changes/remove-content-storage branch from af2e3d2 to 4654849 Compare June 13, 2024 09:18
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 147e4b1 to 0783387 Compare June 13, 2024 09:18
@bastianallgeier bastianallgeier force-pushed the v5/changes/remove-content-storage branch from 4654849 to db198ee Compare June 17, 2024 09:36
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 0783387 to 07885e3 Compare June 17, 2024 09:39
Base automatically changed from v5/changes/remove-content-storage to v5/develop June 18, 2024 19:57
@bastianallgeier bastianallgeier marked this pull request as ready for review June 18, 2024 20:00
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 07885e3 to 31c40ea Compare June 19, 2024 10:45
src/Content/ContentStorageHandler.php Show resolved Hide resolved
src/Content/ContentStorageHandler.php Outdated Show resolved Hide resolved
src/Content/ContentStorageHandler.php Show resolved Hide resolved
src/Content/MemoryContentStorageHandler.php Outdated Show resolved Hide resolved
src/Content/MemoryContentStorageHandler.php Show resolved Hide resolved
tests/Content/MemoryContentStorageHandlerTest.php Outdated Show resolved Hide resolved
@bastianallgeier bastianallgeier force-pushed the v5/changes/memory-storage-handler branch from 2261261 to 4c116b3 Compare June 24, 2024 08:35
@lukasbestle lukasbestle merged commit 8b2e74e into v5/develop Jun 24, 2024
11 checks passed
@lukasbestle lukasbestle deleted the v5/changes/memory-storage-handler branch June 24, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants