90780[FEATURE] Enhance BeforeFileProcessingEvent for force-resizing an image
Commit message
Review
-
Code review CR +1
- C. Gogolin +1
- Garvin Hicking +1
- Lina Wolf +1
- Josua Vogel +1
- Simon Schaufelberger +1
-
Verified V +1
- C. Gogolin +1
- Garvin Hicking +1
- Josua Vogel +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 7
- typo3/sysext/core/Classes/Resource/Event/BeforeFileProcessingEvent.php9+13 −1
- typo3/sysext/core/Classes/Resource/Processing/AdditionalProcessorInstruction.phpnew+39 −0
- typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php6+20 −10
- typo3/sysext/core/Classes/Resource/Processing/ProcessorWithAdditionalInstructionsInterface.phpnew+27 −0
- typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php20+12 −2
- typo3/sysext/core/Documentation/Changelog/14.0/Feature-107290-EnhanceBeforeFileProcessingEventForControlParameters.rst2new+159 −0
- typo3/sysext/core/Tests/Functional/Resource/Service/FileProcessingServiceTest.phpnew+202 −0
Review log 91131
Show 69106 earlier messages
-
Benni Mack uploaded patch set 1 09/23/25, 20:25
-
Benni Mack uploaded patch set 2 09/23/25, 20:27
-
core-ci voted on patch set 1 V +1 09/23/25, 20:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85410
-
core-ci voted on patch set 2 V +1 09/23/25, 20:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85411
-
C. Gogolin commented on patch set 2 09/27/25, 15:13
Slimmer approach than https://review.typo3.org/c/Packages/TYPO3. CMS/+/90428 But I still believe the current implementation of the Heighlander processor chain is not entirely correct from the design. Either there is only one processor or one chain. But the idea that only the first one wins, I think is questionable.BeforeFileProcessingEvent.php:36Undo. see setConfiguration commentBeforeFileProcessingEvent.php:69As a result, I can manipulate the original configuration through the event - including the image size. Since theoretically any number can register at this event, the setting can have difficult to follow. For example, if two independent extensions manipulate the configurations and someone on your target instance wants to use both extensions. I recommend rather public function addConfiguration(string $key, mixed $value): void This method only adds new keys and does not overwrite any existing ones. That would be more restrictive, but it would be enough for now.FileProcessingService.php:81In the task is the manipulated configuration. In ProcessedFile the original configuration. On the add(), the configuration flows into the checksum from the task and the configuration from the processedFile. Why "configurationsha1" also exists I did not see through...FileProcessingService.php:87Question: Wouldn’t it make sense to use the (possibly manipulated) configuration of the BeforeFileProcessingEvent in the AfterFileProcessingEvent? Then the user can draw conclusions about the BeforeEvent from the AfterFileProcessingEvent... -
C. Gogolin commented on patch set 2 09/27/25, 15:54
FileProcessingService.php:81ReplySupplement: In some cases, the checksum can no longer be calculated from the saved configuration. -
C. Gogolin commented on patch set 2 09/28/25, 07:43
BeforeFileProcessingEvent.php:69ReplySupplement - Even better would be: public function addConfiguration(string $key, mixed $value): bool The return value is false if the property could not be set because this setting has already been set by someone else. This gives developers a chance to govern. -
C. Gogolin uploaded patch set 3
V +110/05/25, 11:10 -
core-ci voted on patch set 3 V -1 10/05/25, 11:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86035
-
C. Gogolin uploaded patch set 4
V -110/05/25, 12:11 -
core-ci voted on patch set 4 V -1 10/05/25, 12:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86036
-
C. Gogolin uploaded patch set 5
V -110/05/25, 14:44 -
core-ci voted on patch set 5 V -1 10/05/25, 14:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86037
-
C. Gogolin uploaded patch set 6
V -110/05/25, 15:05 -
core-ci voted on patch set 6 V -1 10/05/25, 15:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86038
-
C. Gogolin uploaded patch set 7
V -110/05/25, 18:59 -
core-ci voted on patch set 7 V -1 10/05/25, 19:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86040
-
C. Gogolin uploaded patch set 8
V -110/06/25, 15:40 -
core-ci voted on patch set 8 V -1 10/06/25, 15:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86080
-
C. Gogolin uploaded patch set 9
V -110/06/25, 15:58 -
core-ci voted on patch set 9 V -1 10/06/25, 16:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86083
-
C. Gogolin uploaded patch set 10
V -110/06/25, 16:56 -
core-ci voted on patch set 10 V -1 10/06/25, 17:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86090
-
C. Gogolin uploaded patch set 11
V -110/06/25, 18:46 -
C. Gogolin uploaded patch set 12 10/06/25, 18:46
-
core-ci voted on patch set 11 V -1 10/06/25, 18:55 Copied votes on follow-up patch sets have been updated: * Verified-1 has been copied to patch set 12 (copy condition: "changekind:NO_CHANGE"). Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86091
-
core-ci voted on patch set 12 V -1 10/06/25, 18:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86092
-
C. Gogolin uploaded patch set 13
V -110/06/25, 19:08 -
core-ci voted on patch set 13 V -1 10/06/25, 19:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86094
-
C. Gogolin uploaded patch set 14
V -110/06/25, 19:20 -
core-ci voted on patch set 14 V +1 10/06/25, 19:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86095
-
Garvin Hicking commented on patch set 15
V +110/06/25, 20:03Published edit on patch set 14. -
Garvin Hicking commented on patch set 16 10/06/25, 20:05
Published edit on patch set 15. -
core-ci voted on patch set 15 V +1 10/06/25, 20:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86096
-
core-ci voted on patch set 16 V +1 10/06/25, 20:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86097
-
C. Gogolin uploaded patch set 17
V +110/07/25, 20:12 -
C. Gogolin uploaded patch set 18 10/07/25, 20:16
-
core-ci voted on patch set 18 V -1 10/07/25, 20:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86187
-
core-ci voted on patch set 17 V -1 10/07/25, 20:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86186
-
C. Gogolin uploaded patch set 19
V -110/08/25, 06:47 -
C. Gogolin uploaded patch set 20 10/08/25, 06:48
-
core-ci voted on patch set 19 V -1 10/08/25, 06:56 Copied votes on follow-up patch sets have been updated: * Verified-1 has been copied to patch set 20 (copy condition: "changekind:NO_CHANGE"). Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86205
-
core-ci voted on patch set 20 V -1 10/08/25, 06:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86206
-
C. Gogolin uploaded patch set 21
V -110/08/25, 07:00 -
core-ci voted on patch set 21 V +1 10/08/25, 07:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86207
-
C. Gogolin uploaded patch set 22
V +110/08/25, 07:37 -
Garvin Hicking commented on patch set 22 10/08/25, 07:42
AbstractTask.php:33can be left unchangedParameterizedProcessorInterface.php:3needs declare(strict_types=1)FileProcessingService.php:65@spam@cylancer.net could you explain why this sanitization is removed? If its intentional a description in the commit message would help, but due to the current commenr I have fears this could lead to trouble? -
Garvin Hicking commented on patch set 22 10/08/25, 07:42
AbstractTask.php:33ReplyDoneParameterizedProcessorInterface.php:3ReplyDone -
core-ci voted on patch set 22 V +1 10/08/25, 07:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86208
-
C. Gogolin updated the commit message in patch set 23
V +110/08/25, 08:28 -
C. Gogolin commented on patch set 23 10/08/25, 08:28
Commit text updated.AbstractTask.php:33Reply👍ParameterizedProcessorInterface.php:3Reply👍FileProcessingService.php:65ReplyIn an interim stand, you could manipulate the configurations via event. This is no longer the case (readonly / not a setter). In 13.4.18 the $configuration is not changed and this behavior was and is also good. That’s why I have the illusion that you can manipulate $configuration immediately remove. -
core-ci voted on patch set 23 V +1 10/08/25, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86211
-
Garvin Hicking updated the commit message in patch set 24
V +110/08/25, 09:53 -
core-ci voted on patch set 24 V +1 10/08/25, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86215
-
Garvin Hicking commented on patch set 24 10/08/25, 10:03
(If this stays a feature, we'll need a ReST file [which I can take care of]) We'll do that once we agree this is a feature and it can get in. -
Simon Schaufelberger commented on patch set 24 10/08/25, 15:30
BeforeFileProcessingEvent.php:31missing s for pluralLocalImageProcessor.php:82parameters -
C. Gogolin commented on patch set 24 10/08/25, 18:42
BeforeFileProcessingEvent.php:31ReplyGlad to rename that. Should I also rename configuration to configurations right away? -
Garvin Hicking commented on patch set 24 10/08/25, 19:49
BeforeFileProcessingEvent.php:31ReplyNo; "configuration" is an implied plural IMO to describe a collection. Also that would be a breaking change if we rename getter/setters too. ;-) For the new parameter I agree, let's use plural for parameters. -
C. Gogolin uploaded patch set 25
V +110/09/25, 04:51 -
core-ci voted on patch set 25 V +1 10/09/25, 04:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86268
-
C. Gogolin uploaded patch set 26
V +110/09/25, 05:06 -
C. Gogolin commented on patch set 26 10/09/25, 05:09
BeforeFileProcessingEvent.php:31ReplyfixedLocalImageProcessor.php:82ReplyfixedProcessorRegistry.php:66Found another gap and fixed it: #canProcessParameterizedTask() can also be used with the Processor parameters. -
core-ci voted on patch set 26 V -1 10/09/25, 05:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86271
-
Garvin Hicking commented on patch set 26 10/09/25, 06:14
ProcessorRegistry.php:45Hhm passing the event here feels wrong. IMO we should not pass events around, only their data. -
C. Gogolin uploaded patch set 27
V -110/09/25, 15:41 -
C. Gogolin commented on patch set 26 10/09/25, 15:41
ProcessorRegistry.php:45ReplyNormalerweise würde ich für die Parameter eine eigene Container-Classe bauen. Das würde hier aber den Rahmen sprengen... -
C. Gogolin commented on patch set 27 10/09/25, 15:42
ProcessorRegistry.php:45ReplyNormally I would build my own container class for the parameters. But that would go beyond the scope... -
C. Gogolin uploaded patch set 28 10/09/25, 15:43
-
Benni Mack commented on patch set 27 10/09/25, 15:44
ParameterizedProcessorInterface.php:23please don't extend the ProcessorInterface - use composition instead of inheritance. This means: The consumer classes need to implement both interfaces. Small but important change in designing interfaces. -
core-ci voted on patch set 27 V -1 10/09/25, 15:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86316
-
core-ci voted on patch set 28 V -1 10/09/25, 15:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86317
-
C. Gogolin uploaded patch set 29
V -110/09/25, 19:19 -
C. Gogolin commented on patch set 29 10/09/25, 19:23
ParameterizedProcessorInterface.php:23ReplyShould I mark the implementations of the methods from the ProcessorInterface with #[Deprecated]? -
core-ci voted on patch set 29 V +1 10/09/25, 19:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86337
-
Simon Schaufelberger uploaded patch set 30
V +110/09/25, 20:13 -
Simon Schaufelberger commented on patch set 30 10/09/25, 20:14
LocalImageProcessor.php:435here the parameters is an unused parameter. Can it be dropped or is it useful to have it passed if you extend the method? -
core-ci voted on patch set 30 V +1 10/09/25, 20:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86341
-
C. Gogolin commented on patch set 30 10/10/25, 06:57
LocalImageProcessor.php:435ReplyEine gute Frage. Mit viel Fantasie könnte man sich vorstellen, dass jemand auch die Preview-Generierung mit Parameters erweitern möchte. Dann wären die vorhanden $parameters schon hilfreich. Aber aktuell wüsste ich nun kein Szenario... ABER: Bei der Processor-Registrierung leisten wir uns auch ein sinnfreies "after" aus Symetriegründen. Bin kein Architekt. Wie ist da eure Strategie? Immer so eng wie möglich oder immer das Struktur-API voll ausreizen? -
C. Gogolin commented on patch set 30 10/10/25, 06:58
LocalImageProcessor.php:435ReplyA good question. With a lot of imagination, you could imagine that someone would also want to expand the preview generation with parameters. Then the existing $parameters would be helpful. But right now I don't know a scenario... BUT: In the processor registration, we also afford a sense-free "after" for reasons of symmetry. Am not an architect. What's your strategy? Always as tight as possible or always fully exploit the structure API? -
Benni Mack commented on patch set 30 10/16/25, 19:27
FileProcessingService.php:81Replywhat would be the downside of recalculating the configuration after the event having the configuration being modified? I'd say that's a good think. This way, we wouldn't need the additional "parameters" logic? -
Benni Mack commented on patch set 30 10/16/25, 19:29
FileProcessingService.php:87ReplyCould be added later, right now I don't see the need. In general when building architectural things: Start with the things you really know you need, instead of coming up with a lot of possible ideas one COULD do. I did it the wrong approach when the whole "AbstractTask" was a good idea (hint: it wasn't). Because effectively TYPO3 has only the few tasks at hand for files, and I have never seen more than TYPO3's own FAL processing tasks in the wild for the last 13 years since I built it (with Andreas). -
C. Gogolin commented on patch set 30 10/17/25, 14:24
FileProcessingService.php:81ReplyExample: original image 1000×1000 px and the parameters are put into the configurations. Suppose I create an image at resolution 100×100 px and set "forceCreation", but that ends up identical to the result from a configuration "100×100 px". Now imagine there is no "forceCreation" but there is a configuration "100×100 px". Wouldn't that create two unnecessary images? Not sure how frugal you want to be about this...FileProcessingService.php:87ReplyOkay. Less is more... I can understand that. I'll go with the smaller option. Maybe in the long run restrict the APIs (make them private). If someone complains, you'll know whether the openness — and the caution that comes with it — is really worth it. ;) -
Benni Mack commented on patch set 30 10/17/25, 16:29
FileProcessingService.php:81ReplyOK. but if I set the parameter "-mask ...." on to the graphical functions setup, then I'd get a different image for this than without this option. that was my background -
Garvin Hicking commented on patch set 30 10/17/25, 17:04
FileProcessingService.php:81ReplyI believe there could be confusion: The "parameters" are not imagemagick/gdlib parameters, but parameters to the task methods / resize method. They would only be evaluated as these. (or did I misunderstand something too?) -
C. Gogolin commented on patch set 30 10/17/25, 19:53
FileProcessingService.php:81ReplyI don't want to hold you up with discussion for too long either. Summary: I think there are settings that affect the final image, and there are settings that control the image processor (e.g., forceCreation or Single/MultiCore or forcing PHP version). Currently an array named $configuration is used to describe the settings and thus the image properties. These $configurations are hashed into the key used for the lookup. That ensures you find images with the specified properties instead of recalculating them. That's great. I'm cautious about mixing semantically different groups of data. That's why I introduced $parameter. Conclusion: Since I don't want to be the final decider later, I'm happy to leave the decision to you — specifically you, Benni — whether forceCreation should go into $configuration or into $parameter (and $parameter can of course be renamed...). How would you like it? I'll refactor it accordingly. -
C. Gogolin commented on patch set 30 10/18/25, 13:49
FileProcessingService.php:81ReplyAddendum: If the decision is made that forceCreation should be in $configuration, then I can dismantle my $parameter-api again. -
Benni Mack uploaded patch set 31
V +110/18/25, 21:07 -
Benni Mack commented on patch set 30 10/18/25, 21:11
FileProcessingService.php:81ReplyOK. This is the problem for me until today. "parameters" is just overused in TYPO3. What is a parameter? how can we become less generic over "configuration" vs. "parameters"? I think we'll do it this way. Let's build an object / DTO "AdditionalProcessorInformation" or "AdditionalProcessorInstruction" with the sole option "forceCreation" for the time being, and replace it via an array, as you said. This helped me: It's not the task, it's information for the processor, or about the processor, also not about the image / file. that's the part we need to put in the RST file and the Event and the DTO class. -
core-ci voted on patch set 31 V -1 10/18/25, 21:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86993
-
C. Gogolin uploaded patch set 32
V -110/19/25, 08:55 -
C. Gogolin uploaded patch set 33 10/19/25, 08:56
-
core-ci voted on patch set 33 V -1 10/19/25, 09:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87007
-
core-ci voted on patch set 32 V -1 10/19/25, 09:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87006
-
C. Gogolin uploaded patch set 34
V -110/19/25, 11:39 -
core-ci voted on patch set 34 V -1 10/19/25, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87014
-
C. Gogolin uploaded patch set 35
V -110/20/25, 06:55 -
core-ci voted on patch set 35 V -1 10/20/25, 07:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87044
-
C. Gogolin uploaded patch set 36
V -110/20/25, 07:11 -
core-ci voted on patch set 36 V -1 10/20/25, 07:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87048
-
C. Gogolin uploaded patch set 37
V -110/20/25, 07:27 -
core-ci voted on patch set 37 V +1 10/20/25, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87051
-
C. Gogolin commented on patch set 37 10/20/25, 19:41
FileProcessingService.php:81Reply@benni@typo3.org I can understand your concerns about the naming. I hope the current state of the code is heading in the right direction for you... "and replace it via an array, as you said." <--- I didn't fully understand what you meant by that. -
Benni Mack commented on patch set 37 10/21/25, 04:59
FileProcessingService.php:81ReplyI don't know if you've seen this but there is a new interface, which can now be utilized in the event to be added to the Processors that are affected. I don't understand fully why you added this to the ProcessedFile now? "and replace it via an array, as you said." This was wrong - let's add a simple DTO "AdditionalProcessorInstruction" that contains "forceCreation" as public property that can be modified via the Event. This information does not need to be connected to the processed file or the task, but only handed in to the Processors. -
C. Gogolin commented on patch set 37 10/21/25, 20:53
FileProcessingService.php:81ReplySorry, I'm not yet familiar with the new interface. Which one do you mean? -
Benni Mack uploaded patch set 38
V +110/21/25, 21:46 -
Benni Mack commented on patch set 38 10/21/25, 21:48
FileProcessingService.php:81ReplyNevermind, the latest patchset is what I meant during this chat. 1. We add a DTO for transferring information solely related to the processor (not related to the task itself). 2. The DTO can be manipulated by the event. 3. A new interface can transfer the DTO to the processor that are capable of handling such things 4. Configuration hash does not change Is that what you had in mind as well? Does it work for you?
-
core-ci voted on patch set 38 V +1 10/21/25, 21:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87204
-
Garvin Hicking commented on patch set 38 10/24/25, 14:52
To chime in: I think the current solution has much charm. It does the necessary transportation of "metadata parameters", moves arranging logic to the PSR-14 event (which has after/before possibilities) and leaves the Processors itself mostly unchanged. We could always revisit this if more needs surface themself for enhancement of the API, but for now this should hopefully cover the use case of doing post-processing of processor results inside an EventListener. If we can all agree, let's resolve comments here and I can offer to write the Feature ReST file, a basic EventListener test and get this up for voting. Thanks for the iterations on this to both Benni and Clemens, I think we all took away something from this :-D -
C. Gogolin commented on patch set 38 10/24/25, 15:11
Reply
Thanks for the tireless support.Reply
Thanks for the tireless support.BeforeFileProcessingEvent.php:36ReplyDoneBeforeFileProcessingEvent.php:69ReplyDoneLocalImageProcessor.php:435ReplyDoneParameterizedProcessorInterface.php:23ReplyDoneFileProcessingService.php:81ReplyNice solution. Instead of inserting a custom forked processor, I use BeforeFileProcessingEvent to prepare the existing processor and AfterFileProcessingEvent to stamp the watermark in my case. Thank youFileProcessingService.php:87ReplyDone -
Benni Mack commented on patch set 38 10/24/25, 15:45
Reply
Thanks to both of you. Are we cool with this? @spam@cylancer.net - are you fine with this approach? I will then create a Feature RST. -
C. Gogolin commented on patch set 38 10/29/25, 11:40
Reply
Perfect - Thank you. -
Benni Mack uploaded patch set 39
V +110/29/25, 14:30 -
Garvin Hicking voted on patch set 39 CR +1 V +1 10/29/25, 14:35
-
core-ci voted on patch set 39 V -1 10/29/25, 14:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87987
-
Garvin Hicking commented on patch set 39 CR 0 V 0 10/29/25, 16:33
sry voted on the rst file and didnt see the code changes too -
Garvin Hicking commented on patch set 40
V -110/29/25, 17:59Published edit on patch set 39. -
core-ci voted on patch set 40 V +1 10/29/25, 18:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88023
-
Garvin Hicking voted on patch set 40 CR +1 V +1 10/29/25, 18:57
-
C. Gogolin voted on patch set 40 V +1 10/30/25, 17:31
-
Simon Schaufelberger voted on patch set 40 CR +1 V +1 10/31/25, 09:01
-
Josua Vogel voted on patch set 40 CR +1 V +1 10/31/25, 10:35
-
Lina Wolf commented on patch set 40 CR +1 10/31/25, 10:46
Code looks goodFeature-107290-EnhanceBeforeFileProcessingEventForControlParameters.rst:14Please use fully qualified names, so ppl can copy them. I f you only want to display the short version, user php-short. Can also be done in a follow up. -
Markus Klein commented on patch set 40 10/31/25, 10:56
Isn't this concept a bit limited? We make this functionality opt-in for Processors via the Interface, but the actual option(s) available via the Instructions are tailored only towards the LocalImageProcessor, but may have no meaning to any other processor. There is no possibility to add different instructions for other processors. -
C. Gogolin voted on patch set 40 CR +1 10/31/25, 11:16
-
Garvin Hicking commented on patch set 40 10/31/25, 11:32
Reply
The discussion of this hinted at: There's not many other image processors implemented "in the wild". So we wanted to not go the "YAGNI" route here and only do what's useful now. We could revisit this if we come up with actual use cases that should be covered, is that ok with you?Feature-107290-EnhanceBeforeFileProcessingEventForControlParameters.rst:14ReplyI'm trying to not lose votes on this, so that would be great to cover in a followup. I do assume we'll have to go through more ReST files that have this wrong. Hope it's fine to resolve this until then. -
Markus Klein commented on patch set 40 10/31/25, 12:07
Reply
Sure, but then IMHO this solution is over-complicated. No need for the dedicated DTO, simply adding the flag to the processTask() method would be sufficient. Also the interface is not necessary then; additional arguments on processTask() do not hurt other implementations. I'm not blocking this by any means, my gut feeling just tells me that this matches the German saying "not fish and not meat". -
C. Gogolin commented on patch set 40 11/02/25, 14:38
Reply
Hello Markus, we briefly had a generic solution for all processors, but that met with objections from the experienced Typo3 developers. So we agreed on this solution. Basically I always think it's good when the API is coupled to the domain content only in a very abstract way. I wasn't entirely happy with it either, but for a first project I prefer to listen to the 'old hands'. For example, I wasn't happy with how the processors are registered and that in the end the very first one found is used. But... At the start I only wanted a change to the helper... (see task) The helper was moved into the processor because it's better. And now in the end... I no longer have forceCreation 😞 -
Benni Mack commented on patch set 40 11/03/25, 06:03
Reply
Just to chime in and clarify this: 1. The helper were moved into the Local*Processors as they fit their purpose now to only be part of this area and tightly connected to the actual implementation, however previously they were API, even though they never was. The code is superugly because it is currently mis-used with Online Media preview images that do not care about FAL and image processing, BUT they are used for it, and generated images are not tracked. If people look at API design, this is superbad and I'd love to revert this feature if it comes to clean API design. 2. The whole API around Tasks and Processors within FAL is flawed and was meant as a different. I built this in 2012, and I deeply regret being the author, and the maintainer of this after 13 years. It was meant to much more and nowadays it is really used for 2 tasks. The point here is: We meant it to be part of a MUCH BIGGER idea, that nobody used. Nowadays I would not even differentiate between "PREVIEW" and "CROPSCALEMASK" anymore. However, it is still there. Nowadays, I would love to have a much better API instead of a good API on top of a bad API (2012). So, I'm not opposed to the other solution, do not get me wrong. Many times I was asked for feedback and my feedback was to go simple instead of overly complex with traits etc. for a topic of adding a watermark. We can go the other way (chained processors), please find other Core mergers that support this. I am not the only one who can merge changes. I am sure others agree with you, and I do not object. Sorry for this long journey of jours @spam@cylancer.net and that this change is not as you wanted it, and even Markus has concerns on this solution. If you find others for the chainable solution (your code is still there), you can discuss this further there. -
C. Gogolin commented on patch set 40 11/04/25, 13:05
Reply
I never thought that my task (https://forge.typo3.org/issues/107290), which I wrote back then, would end up here. Writing dozens of corrections again, finding supporters, just to make a flag called 'forceCreation' switchable in my extension — sorry — that's too much effort for me. I'm still a big fan of TYPO3 and admire your commitment, but I can't keep up with that. See you sometime... -
Garvin Hicking commented on patch set 40 11/04/25, 16:57
Reply
Welcome to our world, where we manage dozens of patches like these in parallel and try to move forward, try to enable supporters/contributors, and make TYPO3 as maintainable and flexible as possible. Developing a CMS like ours is a consttant weighing of options, legacy support, future flexibility - and meanwhile juggling different kinds of people, wishes, spare time, knowledge, experience, motivation. It's a give and take, and everyone has to decide for themself. Often it works out, often it fails. I'm sad we have to put this aside as a failure now. I thought we had reached a concensus, but I understand we have not. The whole process here saddens me on a personal level for everyone involved. I would've loved to see fruition come to the time spent from every side. -
Benni Mack abandoned the change 09/11/26, 22:35
finally, bkott works on a better approach here https://review.typo3.org/c/Packages/TYPO3.CMS/+/93628