-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEATURE] TYPO3 v12 reactions support #107
Merged
Merged
Conversation
This file contains 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
Removes compatibility code for versions below v11 and upgrades composer dependencies.
It is now possible to configure how empty files are handled. The extension configuration property `handleEmptyFile` can be set to these values: 0: Treat as any other file. You can also use this option if you want to handle empty files with a custom `Pixelant\Interest\DataHandling\Operation\Event\BeforeRecordOperationEvent`. Just make sure your EventHandler it is executed after `\Pixelant\Interest\DataHandling\Operation\Event\Handler\PersistFileDataEventHandler`. 1: Stop processing the record. This might result in pending relation records that will never be resolved in the database, but if that's OK for you it won't cause any issues. 2: Fail. The operation will be treated as failed and returns an error.
Removes compatibility code for versions below v11 and upgrades composer dependencies.
It is now possible to configure how empty files are handled. The extension configuration property `handleEmptyFile` can be set to these values: 0: Treat as any other file. You can also use this option if you want to handle empty files with a custom `Pixelant\Interest\DataHandling\Operation\Event\BeforeRecordOperationEvent`. Just make sure your EventHandler it is executed after `\Pixelant\Interest\DataHandling\Operation\Event\Handler\PersistFileDataEventHandler`. 1: Stop processing the record. This might result in pending relation records that will never be resolved in the database, but if that's OK for you it won't cause any issues. 2: Fail. The operation will be treated as failed and returns an error.
Use `getDataForDataHandler()` and `setDataForDataHandler()` instead.
The HTTP request body was previously first parsed into objects and then converted to an array. This was done to be able to detect the difference between record data and nested table/recordId/language/workspace arrays. This can instead be implemented using `array_is_list()`. `symfony/polyfill-php81` provides a polyfill for PHP versions below 8.1. This commit also adds an optional third parameter, `?array $parsedBody = null`, to `\Pixelant\Interest\RequestHandler\AbstractRecordRequestHandler::__construct()`. This parameter makes it possible to supply a parsed JSON body as associative array to avoid parsing JSON twice.
The implementation uses the new core extension "reactions" and is similar to a normal REST request, except from: * The entry point is always the reaction extension's entry point: `/typo3/reaction/{reactionId}` * Backend user authentication is handled by the reactions extension. * The HTTP method of a reaction request must always be POST, so you must instead provide the action in the JSON array key `method` (POST, PUT, PATCH, or DELETE). * `table`, `remoteId`, `language`, and `workspace` can only be supplied in the JSON array.
Outputs error identifiers.
This reverts commit bc05150
UpdateRecordOperationTest has been updated so $imageUpdates is no longer overwritten in the foreach loop. Fixes #103
* Rename `$decodedContent` to `$parsedBody` * Correctly set metadata * Throw exception on JSON decode error * Fetch and parse request body in separate method
This reverts commit ee5574c.
UpdateRecordOperationTest has been updated so $imageUpdates is no longer overwritten in the foreach loop. Fixes #103
No operations were requested and none executed.
Also introduces additional requirements as a way to install and test possible/suggested requirements.
mabolek
changed the title
[WIP][FEATURE] TYPO3 v12 reactions support
[FEATURE] TYPO3 v12 reactions support
Nov 1, 2023
MattiasNilsson
approved these changes
Nov 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome feature 👍
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.
The implementation uses the new core extension "reactions" and is similar to a normal REST request, except from:
/typo3/reaction/{reactionId}
method
(POST, PUT, PATCH, or DELETE).table
,remoteId
,language
, andworkspace
can only be supplied in the JSON array.