Review main Merged

75312[TASK] Avoid deprecated `utf_decode()` method in tests

Stefan Bürk CR +2 V +2 Easy +2 −2 updated 07/27/22, 13:49

Commit message

With PHP 8.2 old and unreliable methods `utf8_encode()`
and `utf8_decode()` have been deprecated and will be
removed in PHP 9.0.

There are several ways to replace these methods, although
none of them are "ensured" to be native enabled in PHP.

We need to replace these methods in tests only, and as
we have testing setup fully under control, this patch
use `mb_convert_encoding()` from php extension `mbstring`
to avoid deprecated methods and corresponding native php
deprecation messages in functional test.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1419

  1. Stefan Bürk uploaded patch set 1 07/27/22, 11:16

  2. Stefan Bürk updated the commit message in patch set 2 07/27/22, 11:17

  3. Stefan Bürk updated the commit message in patch set 3 07/27/22, 11:19

  4. core-ci voted on patch set 2 V +1 07/27/22, 11:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29609

  5. core-ci voted on patch set 3 V +1 07/27/22, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29610

  6. core-ci voted on patch set 1 V +1 07/27/22, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29608

  7. Oliver Klee commented on patch set 3 07/27/22, 11:33

    HtmlentitiesDecodeViewHelperTest.php:88

    AFAICS, this string has only ASCII characters in it. So we can drop the utf8_decode/mb_convert_encoding directly, I think.
  8. Christian Kuhn updated the commit message in patch set 4 07/27/22, 12:16

  9. Stefan Bürk commented on patch set 4 CR -1 07/27/22, 12:19

    HtmlentitiesDecodeViewHelperTest.php:88 Reply

    ack - on it
  10. Stefan Bürk uploaded patch set 5 07/27/22, 12:25

  11. Stefan Bürk commented on patch set 5 07/27/22, 12:26

    HtmlentitiesDecodeViewHelperTest.php:88 Reply

    Done
  12. core-ci voted on patch set 4 V +1 07/27/22, 12:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29612

  13. core-ci voted on patch set 5 V +1 07/27/22, 12:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29614

  14. Christian Kuhn commented on patch set 5 V +1 CR +1 07/27/22, 12:48

    HtmlentitiesDecodeViewHelperTest.php:88 Reply

    yeah.
  15. Christian Kuhn commented on patch set 5 07/27/22, 12:48

    note: php-mbstring *is* a hard requirement in v12 ;)
  16. Stefan Bürk commented on patch set 5 07/27/22, 12:50

    Reply

    Yeah I know. But thanks for stating this.
  17. Oliver Klee voted on patch set 5 V +1 CR +1 07/27/22, 13:14

  18. Stefan Bürk voted on patch set 5 V +2 CR +2 07/27/22, 13:40

  19. Stefan Bürk merged patch set 6 07/27/22, 13:49