73110[TASK] Convert Environment class to an injectable object.
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 11
- typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php+7 −2
- typo3/sysext/backend/Classes/Preview/StandardPreviewRendererResolver.php+7 −1
- typo3/sysext/backend/Resources/Private/Php/backend.php+2 −2
- typo3/sysext/backend/Tests/Unit/Preview/StandardPreviewRendererResolverTest.php2+4 −1
- typo3/sysext/core/Classes/Core/Bootstrap.php+4 −2
- typo3/sysext/core/Classes/Core/Environment.php+77 −92
- typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php+4 −4
- typo3/sysext/core/Resources/Private/Php/cli.php+2 −2
- typo3/sysext/extensionmanager/Tests/Unit/Utility/InstallUtilityTest.php+2 −5
- typo3/sysext/frontend/Resources/Private/Php/frontend.php+2 −2
- typo3/sysext/install/Resources/Private/Php/install.php+2 −2
Review log 79
-
crell uploaded patch set 1 01/20/22, 23:33
-
core-ci voted on patch set 1 V -1 01/20/22, 23:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22326
-
Benjamin Franzke wrote 01/21/22, 05:24
Topic set to di -
Helmut Hummel commented on patch set 1 CR -1 01/21/22, 09:46
Hey. I still think these details matter: https://forge.typo3.org/issues/94995#note-3 -
Helmut Hummel commented on patch set 1 01/21/22, 12:16
StandardPreviewRendererResolverTest.php:36We worked hard to get rid of such static instance getters and we should not take the shortcut and re-introduce them in other places again -
crell commented on patch set 1 01/21/22, 16:28
StandardPreviewRendererResolverTest.php:36Reply UnresolvedI hate it too, but for tests that were recreating the environment anyway off of itself, I'm not sure what a better alternative is. I am open to suggestions. Many other tests are doing something like this: ``` Environment::initialize( new ApplicationContext('Production/Staging/Server2'), true, false, Environment::getProjectPath(), Environment::getPublicPath(), Environment::getVarPath(), Environment::getConfigPath(), Environment::getBackendPath() . '/index.php', Environment::isWindows() ? 'WINDOWS' : 'UNIX' ); ``` That needs to go away, too. I'm just not sure what to replace it with. (I suppose just calling the constructor normally is an option, but I'm not sure what the current net result is of calling all of those static methods, as I'm not clear on what their current values would be.) -
crell uploaded patch set 2 01/21/22, 16:57
-
core-ci voted on patch set 2 V -1 01/21/22, 17:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22362
-
crell abandoned the change 08/01/22, 18:07
Lack of interest.