Repository navigation
Conversation
SLICE_ADD -> Content\ExtensionPoint\SliceAdding
SLICE_UPDATE -> Content\ExtensionPoint\SliceUpdating
SLICE_MOVE -> Content\ExtensionPoint\SliceMoving
SLICE_DELETE -> Content\ExtensionPoint\SliceDeleting
ART_SLICES_COPY -> Content\ExtensionPoint\ArticleSlicesCopying
The points are dispatched before the change and carry the affected slice in its current state, or for adding and
copying the target article together with the content section/module and the source article. They are readonly with a
`null` subject.
`ContentHandler::addSlice()` dispatches `SliceAdding` as well, so slices added via the API end up in the slice
history like those added in the backend. The history no longer requires a logged-in user for the snapshot and falls
back to the environment name, as the handlers do for the create/update user, so slice changes from the console no
longer fail while the history is enabled.
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.
Follow-up to #6762: the extension points dispatched before a slice change become typed classes.
SLICE_ADDContent\ExtensionPoint\SliceAdding$article,$contentSectionId,$moduleKey,$revisionSLICE_UPDATEContent\ExtensionPoint\SliceUpdating$slice(before the update)SLICE_MOVEContent\ExtensionPoint\SliceMoving$slice(before the move),$directionSLICE_DELETEContent\ExtensionPoint\SliceDeleting$sliceART_SLICES_COPYContent\ExtensionPoint\ArticleSlicesCopying$article(target),$source,?int $revision,$overwritenullsubject; naming follows the-ingpattern for points dispatched beforehand (likeMediaAdding).boot/core.phpis typed with the union of the five classes; the history types stored in the database are unchanged (slice_add,slice_update,slice_moveup/slice_movedown,slice_delete,slices_copy). This drops its psalm baseline entries.Extension::register()calls with the old names.Fixes along the way
ContentHandler::addSlice()did not dispatchSLICE_ADDat all (only the backend page did), so slices added via the API bypassed the slice history. It dispatchesSliceAddingnow.ArticleSliceHistory::makeSnapshot()required a logged-in user, so with the history enabled every slice change without one (console, cronjobs) failed with aLogicException. It now falls back to the environment name, like the handlers do forcreateuser/updateuser.Tests
ContentHandlerTestcovers the dispatched points and their payloads, includingcopyContent().ArticleSliceHistoryTestfor a snapshot without a user (fails without the fix).