81793[BUGFIX] Create same configuration in web and cli install process
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Benjamin Franzke +1
- Stefan Bürk +1
- Oliver Hader +1
-
Verified V +2 Done
- Helmut Hummel +2
- Benjamin Franzke +1
- Stefan Bürk +1
- Oliver Hader +1
- core-ci +1 CI
Issues 1
Files 8
- Build/Sources/TypeScript/install/installer.ts+2 −28
- typo3/sysext/install/Classes/Command/SetupCommand.php+3 −10
- typo3/sysext/install/Classes/Controller/InstallerController.php+8 −70
- typo3/sysext/install/Classes/Service/Exception/ConfigurationDirectoryDoesNotExistException.phpnew+25 −0
- typo3/sysext/install/Classes/Service/Exception/ConfigurationFileAlreadyExistsException.phpnew+25 −0
- typo3/sysext/install/Classes/Service/SetupService.php2+49 −17
- typo3/sysext/install/Classes/ServiceProvider.php+2 −4
- typo3/sysext/install/Resources/Public/JavaScript/installer.js+1 −1
Review log 3951
Show 1826 earlier messages
-
Helmut Hummel uploaded patch set 1 11/19/23, 17:27
-
core-ci voted on patch set 1 V +1 11/19/23, 17:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49099
-
Simon Schaufelberger commented on patch set 1 11/22/23, 12:49
double "in" -
Thomas Hohn commented on patch set 1 CR +1 11/22/23, 13:34
Looks fine to me except for the in in issue ;-) -
Simon Schaufelberger updated the commit message in patch set 2
CR +1V +111/23/23, 11:23 -
Simon Schaufelberger commented on patch set 2 CR +1 V +1 11/23/23, 11:23
Reply
Done -
core-ci voted on patch set 2 V +1 11/23/23, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49644
-
Simon Schaufelberger rebased onto patch set 3
CR +1V +101/06/24, 22:28 -
core-ci voted on patch set 3 V +1 01/06/24, 22:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51175
-
Helmut Hummel uploaded patch set 4
V +102/26/24, 11:02 -
core-ci voted on patch set 4 V +1 02/26/24, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53595
-
Stefan Bürk uploaded patch set 5
V +103/04/24, 16:08 -
Stefan Bürk voted on patch set 5 CR +1 V +1 03/04/24, 16:09
-
core-ci voted on patch set 5 V +1 03/04/24, 16:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53878
-
Thomas Hohn voted on patch set 5 CR +1 03/05/24, 13:32
-
Andreas Kienast uploaded patch set 6
CR +1V +103/14/24, 07:55 -
Andreas Kienast commented on patch set 6 03/14/24, 07:55
I've rebased the patch only. -
core-ci voted on patch set 6 V +1 03/14/24, 08:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54516
-
Benjamin Franzke commented on patch set 6 03/16/24, 11:13
Very good catch. This should have never been merged with `.*.*` set by default (looks like it was probably just a left-over and hopefully not really intended as a "sane" default[1]). I wonder how to proceed here. All installations created with with `.*.*` defined in LocalConfiguration.php should be warned. I'm thinking about adding this value to the list of insecure values in `SecurityStatus::getTrustedHostsPatternStatus`. That would probably make ddev users unhappy. But well, I personally still kinda like to do that to force ddev to fix it's broken webserver setups, as it is really the root cause of this misusage of trustedHostPattern. [1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/76860/5/typo3/sysext/install/Classes/Service/SetupService.php#156DefaultFactory.php:167change to "exists in composer mode only for" (otherwise it sounds as if it only exists in composer mode, but not in classic mode) -
Simon Schaufelberger uploaded patch set 7
V +104/21/24, 20:26 -
core-ci voted on patch set 7 V +1 04/21/24, 20:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56441
-
Helmut Hummel uploaded patch set 8
V +104/21/24, 20:43 -
Helmut Hummel commented on patch set 7 04/21/24, 20:43
DefaultFactory.php:167ReplyDone -
Helmut Hummel commented on patch set 8 04/21/24, 20:47
Reply
Yes this value is worse, as SecurityStatus does not even warn, but I don't like this being present in the installer either: https://github.com/TYPO3/typo3/blob/74ea84e22656f787e135f1e1bb50a5fef037867d/typo3/sysext/install/Classes/Controller/InstallerController.php#L225-L236 But that is another story. > I'm thinking about adding this value to the list of insecure values in Maybe performing a check against a randomly generated hostname could make sense to cover other variants of "allow all" regexes.. -
core-ci voted on patch set 8 V +1 04/21/24, 20:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56442
-
Helmut Hummel uploaded patch set 9
V +106/15/24, 20:46
-
core-ci voted on patch set 9 V +1 06/15/24, 20:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59654
-
Markus Klein updated the commit message in patch set 10
V +106/15/24, 21:13 -
core-ci voted on patch set 10 V +1 06/15/24, 21:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59657
-
Simon Schaufelberger voted on patch set 10 CR +1 06/16/24, 08:11
-
Helmut Hummel uploaded patch set 11
CR +1V +109/03/24, 14:43 -
Helmut Hummel commented on patch set 11 09/03/24, 14:44
Reply
Can and should be done in a separate change -
core-ci voted on patch set 11 V -1 09/03/24, 14:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64673
-
Benjamin Franzke commented on patch set 11 09/04/24, 06:33
Reply
ack -
core-ci voted on patch set 11 V +1 09/04/24, 06:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64673
-
Benjamin Franzke commented on patch set 11 CR +1 V +1 09/04/24, 09:06
Reply
Just want to mention. I'm now running into: > The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS['TYPO3_CONF_VARS']['SYS'] with a bare ddev instance, without `system/additional.php` – but that is expected, as the `system/additional.php`, which sets the insecure `trustedHostsPattern` for ddev, is needed for web-installed TYPO3 as well.SetupService.php:349I know this has been used alot of trimes, but replacing paths in strings is always fragile, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/81736 where `PublicPath` was used by accident (and is hard to "find" later). Therefore we decided to not just replace with `getProjectPath()`, but calculate the paths statically, without resolving them into an absolute filepath at all. Ideally `ConfigurationManager` would learn methods to provide static path names (cleary intended for user-facing messages). …but I can ignore that "for" now, as we have the same code in typo3/sysext/backend/Classes/Preview/FluidBasedContentPreviewRenderer.php -
Garvin Hicking commented on patch set 11 09/04/24, 09:37
Reply
(Minor note too: This can BTW be remedied if one executes the installer with http:// instead of https:// - with "bare" you probably mean "project_type=php"? With "project_type=typo3" you need to restart ddev after a composer install so that the DDEV recognition to create AdditionalConfiguration can take effect) -
Benjamin Franzke commented on patch set 11 09/04/24, 09:44
Reply
> with "bare" you probably mean "project_type=php"? yes -
Oliver Hader voted on patch set 11 CR +1 09/05/24, 09:56
-
Garvin Hicking commented on patch set 11 09/05/24, 10:29
I haven't checked this yet due to time constraints. Could the silentconfig upgrader be needed to actually migrate ddevs AdditionalConfiguration.php to additional.php, so it can take effect? Removing that call would mean ddevs trustedHostPattern approach would not work. -
Oliver Hader voted on patch set 11 V +1 09/05/24, 10:45
-
Oliver Hader commented on patch set 11 09/05/24, 10:53
Reply
It looks(!) like this (writing/migrating `additional.php`) is handled by DDEV: https://github.com/ddev/ddev/blob/d7c0aff523c9b1a33abdb1de446887ebe04fe3c5/pkg/ddevapp/typo3.go#L132-L145 -
Garvin Hicking commented on patch set 11 09/05/24, 10:56
Reply
This only works in composer based ddev typo3 installs, not legacy/for typo3 contributors, IIRC? -
Garvin Hicking commented on patch set 11 09/05/24, 11:13
Reply
(The matrix I wanted to test, but couldn't yet:) - CLI composer ddev type=typo3 - CLI composer ddev type=php - CLI legacy ddev type=typo3 - CLI legacy ddev type=php - CLI contrib-legacy ddev type=typo3 - WEB composer ddev type=typo3 - WEB composer ddev type=php - WEB legacy ddev type=typo3 - WEB legacy ddev type=php - WEB contrib-legacy ddev type=typo3 My feedback here shouldn't be blocking. Please resolve if you feel this is unhelpful. -
Stefan Bürk commented on patch set 11 09/05/24, 11:59
Reply
I guess we need to contribute monorepo handling to ddev to use the proper path/files so ddev handles this correctly. Relying on "silent migration" is not good here anyway. Beside that, silent configuration can still be triggered/executed by running the upgrade wizards command (which is also dirty in some way): ``` bin/typo3 upgrade:run ``` At least when using cli setup (which is also the recommended and documented way in the core contribution guide). Using the installer (web) the trustedHostPattern needs to be provided manually - or the "AdditionalConfiguration.php" copied manually before calling the web installer.SetupService.php:349ReplyShould at least be a construct to extract `getProjectPath()` from "left" only if $absolutePath starts with it. str_start_with() and substring() construct. We should have something like that (tested) in general somewhere in the core. Maybe also time to think about using symfony file/path tools (indirectly required yet). -
Stefan Bürk commented on patch set 11 09/05/24, 13:25
-
Stefan Bürk voted on patch set 11 CR +1 V +1 09/05/24, 18:03
-
Helmut Hummel commented on patch set 11 09/06/24, 08:35
Reply
Silent config upgrader is removed and now not executed any more on a clean install. This is unrelated to upgrades. Besides, the silent config upgrader does not handle additional config anyway -
Helmut Hummel voted on patch set 11 CR +2 V +2 09/06/24, 08:36
-
Helmut Hummel merged patch set 12 09/06/24, 08:36
-
Helmut Hummel commented on patch set 12 09/06/24, 08:36
Thanks anyone for your reviews!