From 926722bab3064528450c2d3a48736eea80a80641 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Mon, 20 May 2024 14:32:44 -0600 Subject: [PATCH] fix: TYPO3 no longer has typo3cms command, update other out-of-date (#6211) [skip ci] --- .spellcheckwordlist.txt | 1 - cmd/ddev/cmd/commands_test.go | 4 ++-- docs/content/users/usage/cms-settings.md | 2 +- docs/content/users/usage/managing-projects.md | 2 +- .../global_dotddev_assets/commands/web/typo3cms | 12 ------------ pkg/ddevapp/templates.go | 2 +- pkg/ddevapp/typo3.go | 10 +++++----- pkg/ddevapp/typo3/AdditionalConfiguration.php | 2 +- 8 files changed, 11 insertions(+), 24 deletions(-) delete mode 100755 pkg/ddevapp/global_dotddev_assets/commands/web/typo3cms diff --git a/.spellcheckwordlist.txt b/.spellcheckwordlist.txt index f9b39b4e007..92aeacab5c0 100644 --- a/.spellcheckwordlist.txt +++ b/.spellcheckwordlist.txt @@ -1,7 +1,6 @@ 1Password ARG AdditionalConfig -AdditionalConfiguration Adminer Apache Acquia diff --git a/cmd/ddev/cmd/commands_test.go b/cmd/ddev/cmd/commands_test.go index 8d19646f154..ed7a67e02a0 100644 --- a/cmd/ddev/cmd/commands_test.go +++ b/cmd/ddev/cmd/commands_test.go @@ -213,7 +213,7 @@ func TestCustomCommands(t *testing.T) { app.Type = origAppType // The various CMS commands should not be available here - for _, c := range []string{"artisan", "cake", "drush", "magento", "typo3", "typo3cms", "wp"} { + for _, c := range []string{"artisan", "cake", "drush", "magento", "typo3", "wp"} { _, err = exec.RunHostCommand(DdevBin, c, "-h") assert.Error(err, "found command %s when it should not have been there (no error) app.Type=%s", c, app.Type) } @@ -225,7 +225,7 @@ func TestCustomCommands(t *testing.T) { _, _ = exec.RunHostCommand(DdevBin, "debug", "fix-commands") err = app.MutagenSyncFlush() assert.NoError(err) - for _, c := range []string{"typo3", "typo3cms"} { + for _, c := range []string{"typo3"} { _, err = exec.RunHostCommand(DdevBin, "help", c) assert.NoError(err) } diff --git a/docs/content/users/usage/cms-settings.md b/docs/content/users/usage/cms-settings.md index cae23d7e506..4af0a12f706 100644 --- a/docs/content/users/usage/cms-settings.md +++ b/docs/content/users/usage/cms-settings.md @@ -103,7 +103,7 @@ $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml' #### Settings Files -On [`ddev start`](../usage/commands.md#start), DDEV creates a `public/typo3conf/AdditionalConfiguration.php` file with database configuration in it. +On [`ddev start`](../usage/commands.md#start), DDEV creates a `config/system/additional.php` file with database configuration in it. #### Setup a Base Variant (since TYPO3 9.5) diff --git a/docs/content/users/usage/managing-projects.md b/docs/content/users/usage/managing-projects.md index f6d6466ad46..c7b167e0790 100644 --- a/docs/content/users/usage/managing-projects.md +++ b/docs/content/users/usage/managing-projects.md @@ -16,7 +16,7 @@ For **Magento 1**, DDEV settings go into `app/etc/local.xml`. In **Magento 2**, DDEV settings go into `app/etc/env.php`. -For **TYPO3**, DDEV settings are written to `AdditionalConfiguration.php`. If `AdditionalConfiguration.php` exists and is not managed by DDEV, it will not be modified. +For **TYPO3**, DDEV settings are written to `config/system/additional.php`. If `additional.php` exists and is not managed by DDEV, it will not be modified. For **WordPress**, DDEV settings are written to a DDEV-managed file, `wp-config-ddev.php`. The `ddev config` command will attempt to write settings through the following steps: diff --git a/pkg/ddevapp/global_dotddev_assets/commands/web/typo3cms b/pkg/ddevapp/global_dotddev_assets/commands/web/typo3cms deleted file mode 100755 index eb877966d20..00000000000 --- a/pkg/ddevapp/global_dotddev_assets/commands/web/typo3cms +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -#ddev-generated -# This assumes that the typo3cms command will be in the $PATH; if in vendor/bin/ it will be - -## Description: Run TYPO3 Console (typo3cms) command inside the web container -## Usage: typo3cms [args] -## Example: "ddev typo3cms cache:flush" or "ddev typo3cms database:export" -## ProjectTypes: typo3 -## ExecRaw: true - -typo3cms "$@" diff --git a/pkg/ddevapp/templates.go b/pkg/ddevapp/templates.go index 56eef5af6f5..df6408ca3ba 100644 --- a/pkg/ddevapp/templates.go +++ b/pkg/ddevapp/templates.go @@ -188,7 +188,7 @@ const ConfigInstructions = ` # disable_settings_management: false # If true, DDEV will not create CMS-specific settings files like -# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php +# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php # In this case the user must provide all such settings. # You can inject environment variables into the web container with: diff --git a/pkg/ddevapp/typo3.go b/pkg/ddevapp/typo3.go index ce2157cb01d..2d0ce9b40ad 100644 --- a/pkg/ddevapp/typo3.go +++ b/pkg/ddevapp/typo3.go @@ -16,8 +16,8 @@ import ( "github.com/ddev/ddev/pkg/util" ) -// createTypo3SettingsFile creates the app's LocalConfiguration.php and -// AdditionalConfiguration.php, adding things like database host, name, and +// createTypo3SettingsFile creates the app's settings.php and +// additional.php, adding things like database host, name, and // password. Returns the fullpath to settings file and error func createTypo3SettingsFile(app *DdevApp) (string, error) { if filepath.Dir(app.SiteDdevSettingsFile) == app.AppRoot { @@ -29,7 +29,7 @@ func createTypo3SettingsFile(app *DdevApp) (string, error) { util.Warning("TYPO3 does not seem to have been set up yet, missing %s (%s)", filepath.Base(app.SiteSettingsPath), app.SiteSettingsPath) } - // TYPO3 DDEV settings file will be AdditionalConfiguration.php (app.SiteDdevSettingsFile). + // TYPO3 DDEV settings file will be additional.php (app.SiteDdevSettingsFile). // Check if the file already exists. if fileutil.FileExists(app.SiteDdevSettingsFile) { // Check if the file is managed by ddev. @@ -47,14 +47,14 @@ func createTypo3SettingsFile(app *DdevApp) (string, error) { output.UserOut.Printf("Generating %s file for database connection.", filepath.Base(app.SiteDdevSettingsFile)) if err := writeTypo3SettingsFile(app); err != nil { - return "", fmt.Errorf("failed to write TYPO3 AdditionalConfiguration.php file: %v", err.Error()) + return "", fmt.Errorf("failed to write TYPO3 %s file: %v", app.SiteDdevSettingsFile, err.Error()) } return app.SiteDdevSettingsFile, nil } // writeTypo3SettingsFile produces AdditionalConfiguration.php file -// It's assumed that the LocalConfiguration.php already exists, and we're +// It's assumed that the settings.php already exists, and we're // overriding the db config values in it. The typo3conf/ directory will // be created if it does not yet exist. func writeTypo3SettingsFile(app *DdevApp) error { diff --git a/pkg/ddevapp/typo3/AdditionalConfiguration.php b/pkg/ddevapp/typo3/AdditionalConfiguration.php index 47543b3a505..c974851f25f 100644 --- a/pkg/ddevapp/typo3/AdditionalConfiguration.php +++ b/pkg/ddevapp/typo3/AdditionalConfiguration.php @@ -1,7 +1,7 @@