Move RedirectFinisher to always execute last using "finally" key#1347
Merged
mschwemer merged 1 commit intoin2code-de:typo3-v12from Feb 25, 2026
Merged
Move RedirectFinisher to always execute last using "finally" key#1347mschwemer merged 1 commit intoin2code-de:typo3-v12from
mschwemer merged 1 commit intoin2code-de:typo3-v12from
Conversation
1927e9f to
6763324
Compare
mschwemer
reviewed
Feb 25, 2026
mschwemer
reviewed
Feb 25, 2026
mschwemer
reviewed
Feb 25, 2026
Collaborator
|
Hi Thanks for this idea an PR. Can you fix indendation issues, I commented on. Then I am happy to merge your PR. |
Problem:
- Finishers are sorted by numeric keys, which can cause custom finishers to be skipped.
- RedirectFinisher throws a PropagateResponseException, halting execution of any finishers with higher keys.
Solution:
- Introduce a "finally" key in the finisher configuration.
- If a finisher is defined under "finally", it is moved to the highest numeric key.
- Preserves the full finisher structure and avoids duplicates if the class is already present.
- Ensures RedirectFinisher (or any finally finisher) always runs last, without losing custom finishers.
Example:
plugin.tx_powermail.settings.setup.finishers {
10.class = In2code\Powermail\Finisher\SaveToAnyTableFinisher
20.class = In2code\Powermail\Finisher\SendParametersFinisher
finally.class = In2code\Powermail\Finisher\RedirectFinisher
1000.class = Vendor\Ext\Finisher\CustomFinisher
}
This guarantees predictable execution order and maintains backward compatibility with manual configurations.
resolves in2code-de#1346
6763324 to
4524a74
Compare
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.
Problem:
Solution:
Example:
plugin.tx_powermail.settings.setup.finishers {
10.class = In2code\Powermail\Finisher\SaveToAnyTableFinisher
20.class = In2code\Powermail\Finisher\SendParametersFinisher
finally.class = In2code\Powermail\Finisher\RedirectFinisher
1000.class = Vendor\Ext\Finisher\CustomFinisher
}
This guarantees predictable execution order and maintains backward compatibility with manual configurations.
resolves #1346