Review main Merged

72055[BUGFIX] Suppress E_DEPRECATED for strftime() and gmstrftime()

Stefan Bürk CR +2 V +2 Easy +29 −15 updated 11/05/21, 09:34

Commit message

PHP functions strftime() and gmstrftime() have been deprecated in
PHP 8.1 and will be removed in PHP 9.0. Currently, there is no way
to replace this seamlessly as no drop-in replacement is available.

Official PHP 8.1 deprecation RFC:
https://wiki.php.net/rfc/deprecations_php_8_1#strftime_and_gmstrftime

strftime() has been used in several places in the core, and even
concrete wrapper like TypoScript 'stdWrap_strftime' or support in
fluid viewhelper 'f:date'. Besides this, some places used it to
format date or locale datetimes, which may be replaceable.

As we cannot provide drop-in replacement which would be breaking,
or adding a hard requirement of the optional php extension intl,
this patch suppresses deprecation warnings on calls of strftime()
and gmstrftime(), using the '@' error control operator.

Further, corresponding @todo's are added along the way to replace
the occurrences in v12.

Review

  • Code review CR +2

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

  • Verified V +2

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

Issues 2

Files 9