Review main Abandoned

93194[TASK] Allow silencing deprecations on CLI cache:warmup

Garvin Hicking CR 0 V 0 Easy +34 −0 updated 10/02/26, 07:36

Commit message

The CLI command `bin/typo3 cache:warmup` can spin up multiple
TYPO3 caches, which in turn may trigger deprecations.

Many of these are helpful to have, however the recently integrated
localization XLIFF deprecations will all be triggered on
cache warmup, since every available XLIFF file will be warmed up.

Since we cannot skip warming up deprecated XLIFF files without possible
side-effects (they might then not be available in cached usage),
this patch introduces a new opt-in console argument:

```
bin/typo3 cache:warmup --skip-deprecations
```

When this is set, deprecations are silenced similar to the approach
in fluid core [1].

Additionally, when the `--verbose` CLI argument is set, a success
message on cache warmup can be shown, and when also `-s` is used,
it will reveal the number of skipped deprecations.

This argument can be used in deployment or testing scenarios, where
these deprecations are not relevant.

The new argument is does not change any existing behavior when not
activated explicitly.

[1] https://github.com/TYPO3/Fluid/blob/fb31cfe066f9807f818d054f67c74e10304cc31e/src/Validation/TemplateValidator.php#L33

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 1213

  1. Garvin Hicking uploaded patch set 1 03/15/26, 13:04

  2. core-ci voted on patch set 1 V +1 03/15/26, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97970

  3. Simon Praetorius commented on patch set 1 03/16/26, 10:44

    Since Fluid already does this internally, it might make sense to extend the event with a "deprecations" property, so Fluid could provide those to get the right number? But I'm mostly interested in other opinions if the flag makes sense at all or if cache warmup should skip deprecations by default.
  4. Nikita Hovratov commented on patch set 1 03/16/26, 11:47

    Reply

    > But I'm mostly interested in other opinions if the flag makes sense at all or if > cache warmup should skip deprecations by default. That's what I was thinking as well. No one will notice this new flag appeared in the cache:warmup command and will wonder, why the deprecation log is full with warnings from the Core. IMO Core should never cause deprecation warnings conflicted by itself.
  5. Stefan Bürk commented on patch set 1 03/16/26, 12:48

    CacheWarmupCommand.php:87

    Not a fan of setting a additional error handler heare on top, which is not properly cleaned up anyway. Could have side-effects if commands are chained. On top, this overrides/overrules generic error handler/level settings. Not sure if we really should introduce this here. Don't get me wrong - not saying that the language/localization deprecations are a good thing. I guess we should revisit the change adding the deprecation throwing and making "that" configurable ? at least until core does not have any deprecation itself anymore. Not sure if we can make that "system/extension" wise as exclude to have that dedicated between core CI and project/extension CI runs or similar. We could also consider to have the language file warmup silenced and having a dedicated "validation" command doing the same thing without cache to gather deprecations and display them more directly instead of this ?
  6. Garvin Hicking commented on patch set 1 03/16/26, 13:01

    Reply

    Please note this is `cache:warmup` and not `fluid:cache:warmup` I definitely think we need to have deprecations triggered by default. It's not by itself really, because the language labels might be utilized outside core and "we" can't tell. In this case for XLIFF labels.
  7. Garvin Hicking commented on patch set 1 03/16/26, 13:02

    CacheWarmupCommand.php:87 Reply

    > Not a fan of setting a additional error handler heare on top, which is not properly cleaned up anyway. Could have side-effects if commands are chained. On chained commands, one script ends when the next is run, I don't see an issue with that? > On top, this overrides/overrules generic error handler/level settings. Not sure if we really should introduce this here. Fluid does this too and that should be investigated then...? > We could also consider to have the language file warmup silenced and having a dedicated "validation" command doing the same thing without cache to gather deprecations and display them more directly instead of this ? Could be. I can't offer much to offer to work on something more sophisticated though. I'm fine with abandoning this.
  8. Simon Praetorius commented on patch set 1 03/16/26, 15:29

    Reply Unresolved

    > Please note this is `cache:warmup` and not `fluid:cache:warmup` Yes, but Fluid uses the event to warmup templates, which internally disables deprecations within Fluid templates. So if we count deprecations now, this wouldn't be correct anymore. > I definitely think we need to have deprecations triggered by default. It's not by itself really, because the language labels might be utilized outside core and "we" can't tell. In this case for XLIFF labels. I meant if that specific command should trigger deprecations, since it's usually triggered quite regularly (e. g. with every deployment) with potentially many deprecations and would fill up the log with duplicates. I don't have a clear preference for any alternative: * current behavior: log deprecations if enabled * don't log deprecations if enabled * provide an option `--skip-deprecations` * provide an option `--log-deprecations` (or similar)
  9. Benni Mack updated the commit message in patch set 2 V +1 04/22/26, 07:25

  10. Garvin Hicking commented on patch set 2 10/02/26, 06:55

    I will mark this as WIP. I don't know how to move forward with this.
  11. Garvin Hicking marked it work in progress 10/02/26, 06:55

  12. Benni Mack commented on patch set 2 10/02/26, 07:32

    CacheWarmupCommand.php:87 Reply Unresolved

    abandon it
  13. Garvin Hicking abandoned the change 10/02/26, 07:36