Avoid output of deprecations?
Other widespread PHP libraries seem to use the silencing operator @ when triggering exceptions. We should probably do the same in Fluid v4. We should check how this affects TYPO3's deprecation logs and test suite.
Related links:
- https://docs.phpunit.de/en/10.5/error-handling.html
- https://symfony.com/doc/current/components/phpunit_bridge.html
- https://stackoverflow.com/questions/41545682/what-is-the-purpose-of-silence-operator-at-sign-before-trigger-error
core does this: https://github.com/TYPO3/typo3/commit/8140ec47928543e2c28c1974f77852a361b26246 the code was moved around a bit over time, but it's still same strategy: log deprecations, even if it has the STFU operator.
I just tested this with phpunit's default error handler: The deprecation with STFU operator in fact is ignored by phpunit. TYPO3 on the other hand logs both kinds of deprecations.
So I would argue to only add the operator to deprecations that are added after a major release and to leave those for Fluid v4 without the operator.
What do you think?
Sounds like a good trade-off. Let's see if we can manage to stick to this ;)