TYPO3 / Fluid

Fluid template rendering engine - Standalone version
GNU Lesser General Public License v3.0
153 stars 93 forks source link

Avoid output of deprecations? #984

Open s2b opened 3 weeks ago

s2b commented 3 weeks ago

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:

lolli42 commented 3 weeks ago

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.

s2b commented 1 week ago

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?

lolli42 commented 3 days ago

Sounds like a good trade-off. Let's see if we can manage to stick to this ;)