Review main Merged

77272[TASK] Remove extension_loaded('hash') check

Christian Kuhn CR +2 V +2 Easy +5 −26 updated 01/06/23, 15:20

Commit message

PHP extension 'hash' is a PHP core built in since 7.4
and can't be disabled. Clean up the core a bit.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Stefan Bürk +1
    • Christoph Lehmann +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1417

  1. Christian Kuhn uploaded patch set 1 01/06/23, 08:59

  2. core-ci voted on patch set 1 V +1 01/06/23, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35523

  3. Christoph Lehmann commented on patch set 1 01/06/23, 09:43

    Nice. What about its functions, see "function_exists('hash')" or "function_exists('hash" ? Should they stay for having better readable code or might it be better to remove them an get an Exception?
  4. Christoph Lehmann commented on patch set 1 01/06/23, 09:52

    Check.php:70

    json is also built-in https://www.php.net/manual/en/extensions.membership.php no blocker but for completeness.
  5. Christian Kuhn uploaded patch set 2 V +1 01/06/23, 10:25

  6. Christian Kuhn commented on patch set 1 01/06/23, 10:26

    Reply

    Done

    Check.php:70 Reply

    good catch. should be another patch since ext-json then can be removed from composer.json files as well.
  7. core-ci voted on patch set 2 V +1 01/06/23, 10:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35525

  8. Stefan Bürk commented on patch set 2 01/06/23, 10:55

    BcryptPasswordHash.php:71

    method doc not really correct now. (outdated).

    BcryptPasswordHash.php:77

    should we not keep the algo check at least ?
  9. Christian Kuhn uploaded patch set 3 V +1 01/06/23, 11:10

  10. Christian Kuhn commented on patch set 2 01/06/23, 11:10

    BcryptPasswordHash.php:71 Reply

    Done

    BcryptPasswordHash.php:77 Reply

    as far as i understand sha384 is a hard built-in along with the other sha algos.
  11. Christoph Lehmann commented on patch set 3 01/06/23, 11:11

    BcryptPasswordHash.php:77 Reply

    IMHO when a unit/functional test requires/enforces that 'sha384' exists in hash_algos(), then it would be okay for me to drop the hash_algos() call.
  12. core-ci voted on patch set 3 V +1 01/06/23, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35527

  13. Stefan Bürk commented on patch set 3 V +1 CR +1 01/06/23, 11:49

    BcryptPasswordHash.php:77 Reply

    That algo is hardcoded/included in php like the methods. They also kept really old algos. Removing the check here is okay, if they really removes it in 20 oder 30 years, it would be deprecated before. and detected.
  14. Christoph Lehmann voted on patch set 3 CR +1 01/06/23, 12:17

  15. Anja Leichsenring voted on patch set 3 CR +2 01/06/23, 15:19

  16. Anja Leichsenring voted on patch set 3 V +2 01/06/23, 15:19

  17. Anja Leichsenring merged patch set 4 01/06/23, 15:20