Review main Abandoned

77490[WIP][TASK] Replace getEnv() with $_ENV in all places

TYPO3com CR 0 V 0 Normal +60 −50 updated 01/22/24, 12:20

Commit message

As per https://github.com/vlucas/phpdotenv#putenv-and-getenv it's
discouraged to use getenv instead of $_ENV due to not being threadsafe.
Furthermore using $_ENV instead of getenv will avoid a bug(?) that
currently happens with symfony/dotenv where getenv will not return
the env variable.

This change aims to allow usage of env vars in all places
when using "symfony/dotenv".

>> temporarly required testing-framework branch to evaulate
   preparation there against the work in this change

Used command(s):

> composer require --dev \
  "typo3/testing-framework":"dev-env-handling-1"

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 19

Review log 1019

  1. TYPO3com uploaded patch set 1 01/19/23, 10:02

  2. core-ci voted on patch set 1 V -1 01/19/23, 10:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36180

  3. - Thiel uploaded patch set 2 V -1 01/19/23, 16:13

  4. core-ci voted on patch set 2 V -1 01/19/23, 16:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36269

  5. Benni Mack rebased onto patch set 3 V -1 03/08/23, 08:11

  6. core-ci voted on patch set 3 V -1 03/08/23, 08:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38643

  7. Benni Mack rebased onto patch set 4 V -1 03/24/23, 08:24

  8. core-ci voted on patch set 4 V -1 03/24/23, 08:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39525

  9. Benni Mack uploaded patch set 5 V -1 03/24/23, 10:03

  10. Benni Mack updated the commit message in patch set 6 03/24/23, 10:04

  11. core-ci voted on patch set 5 V -1 03/24/23, 10:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39533

  12. core-ci voted on patch set 6 V -1 03/24/23, 10:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39535

  13. Stefan Bürk commented on patch set 6 03/24/23, 11:09

    I guess there are places missing: * Build/phpunit/UnitTestsBootstrap.php * TF has quite some putenv() / getenv() calls * ...
  14. Stefan Bürk uploaded patch set 7 V -1 04/15/23, 17:01

  15. core-ci voted on patch set 7 V -1 04/15/23, 17:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40685

  16. Stefan Bürk uploaded patch set 8 V -1 04/15/23, 18:10

  17. core-ci voted on patch set 8 V -1 04/15/23, 18:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40693

  18. Christian Kuhn commented on patch set 8 01/22/24, 12:20

    Hey. I'm going to abandon here for now, I hope its ok to do so. The main issue is that $_ENV is *not* typically populated in various environments, so switching from getEnv() to direct global $_ENV access is not ok and breaks a lot. *If* we want to avoid getEnv(), this will need an API instead.
  19. Christian Kuhn abandoned the change 01/22/24, 12:20