Review main Merged

70444[TASK] Use native str_starts_with() PHP method

Benni Mack CR +2 V +2 Hard +174 −120 updated 09/20/21, 20:01

Commit message

One of our main utility methods "GeneralUtility::isFirstPartOfStr"
can now replaced by PHP's native "str_starts_with()" function
(see https://www.php.net/manual/en/function.str-starts-with.php)
which is also available for PHP 7.4 thanks to Symfony's polyfill
package.

This way, we can
a) slim down our own code base in favor of native PHP calls
b) add a bit of performance due to native PHP calls
c) move towards type-safety to ensure that we hand over strings
to these methods, as our own method was a bit more "lax" on things

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 28

Show 8 more files

Review log 69

  1. Benni Mack uploaded patch set 1 08/11/21, 08:19

  2. core-ci voted on patch set 1 V +1 08/11/21, 08:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14554

  3. Benni Mack uploaded patch set 2 09/17/21, 08:06

  4. core-ci voted on patch set 2 V +1 09/17/21, 08:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16855

  5. Benni Mack uploaded patch set 3 09/20/21, 14:48

  6. core-ci voted on patch set 3 V +1 09/20/21, 15:03 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16942

  7. Georg Ringer voted on patch set 3 V +1 CR +1 09/20/21, 19:23

  8. Christian Kuhn voted on patch set 3 V +2 CR +2 09/20/21, 20:01

  9. Christian Kuhn merged patch set 4 09/20/21, 20:01