Review main Abandoned

77632[POC][TASK] Convert doctrine deprecations to exceptions

Stefan Bürk CR 0 V 0 Normal +80 −3 updated 09/26/23, 09:47

Commit message

This change ensures that doctrine deprecations are
properly converted to exceptions in phpunit unit-
and functional tests. This helps to get an overview
of hidden deprecations and extract pre-patches to
mitigate and solve these deprecation in TYPO3 core
way and policy.

Sadly, phpunit provided error handler doesn't convert
suppressed errors to exception, even if the specific
configuration options is enabled. "doctrine/dbal" uses
the php error suppress operator "@" before the wrapped
`trigger_error()` call if deprecation should be triggerd.
This left us in a state not directly detecting doctrine
deprecations.

Beside enable trigger errors in unit- and functional
bootstrap this changes applies a patch to the doctrine
deprecations package to revert the suppressing.

Therefor this is only a POC to find the corresponding
deprecation we need to address as preparation for the
upcoming "doctrine/dbal" 4.x release.

* added "cweagans/composer-patches" as development
  dependency
* created patch file for "doctrine/deprecations" to
  revert the suppressing of trigger_error

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Files 9