diff --git a/pkg/ddevapp/apptypes.go b/pkg/ddevapp/apptypes.go index 4069d065800..f83232d124d 100644 --- a/pkg/ddevapp/apptypes.go +++ b/pkg/ddevapp/apptypes.go @@ -151,9 +151,8 @@ func init() { }, nodeps.AppTypeLaravel: { - appTypeDetect: isLaravelApp, - postStartAction: laravelPostStartAction, - configOverrideAction: laravelConfigOverrideAction, + appTypeDetect: isLaravelApp, + postStartAction: laravelPostStartAction, }, nodeps.AppTypeSilverstripe: { @@ -168,7 +167,6 @@ func init() { uploadDirs: getMagentoUploadDirs, appTypeSettingsPaths: setMagentoSiteSettingsPaths, appTypeDetect: isMagentoApp, - configOverrideAction: magentoConfigOverrideAction, importFilesAction: magentoImportFilesAction, }, diff --git a/pkg/ddevapp/apptypes_test.go b/pkg/ddevapp/apptypes_test.go index 2fa072f05e8..d2201bc8c4f 100644 --- a/pkg/ddevapp/apptypes_test.go +++ b/pkg/ddevapp/apptypes_test.go @@ -67,10 +67,10 @@ func TestConfigOverrideAction(t *testing.T) { nodeps.AppTypeDrupal7: nodeps.PHP82, nodeps.AppTypeDrupal: nodeps.PHPDefault, nodeps.AppTypeLaravel: nodeps.PHP82, - nodeps.AppTypeMagento: nodeps.PHP74, - nodeps.AppTypeMagento2: nodeps.PHP81, + nodeps.AppTypeMagento: nodeps.PHPDefault, + nodeps.AppTypeMagento2: nodeps.PHP82, + nodeps.AppTypeSilverstripe: nodeps.PHPDefault, nodeps.AppTypeWordPress: nodeps.PHPDefault, - nodeps.AppTypeSilverstripe: nodeps.PHP81, } for appType, expectedPHPVersion := range appTypes { diff --git a/pkg/ddevapp/config_test.go b/pkg/ddevapp/config_test.go index b6073b24c98..0d029f1087a 100644 --- a/pkg/ddevapp/config_test.go +++ b/pkg/ddevapp/config_test.go @@ -226,7 +226,7 @@ func TestConfigCommand(t *testing.T) { const apptypePos = 0 const phpVersionPos = 1 testMatrix := map[string][]string{ - "magentophpversion": {nodeps.AppTypeMagento, nodeps.PHP74}, + "magentophpversion": {nodeps.AppTypeMagento, nodeps.PHPDefault}, "drupal7phpversion": {nodeps.AppTypeDrupal7, nodeps.PHP82}, "drupalphpversion": {nodeps.AppTypeDrupal, nodeps.PHPDefault}, } diff --git a/pkg/ddevapp/drupal.go b/pkg/ddevapp/drupal.go index 902cf1f3af0..433d932f32c 100755 --- a/pkg/ddevapp/drupal.go +++ b/pkg/ddevapp/drupal.go @@ -369,7 +369,6 @@ func drupalConfigOverrideAction(app *DdevApp) error { app.Database = DatabaseDesc{Type: nodeps.MariaDB, Version: nodeps.MariaDB104} case "9": app.PHPVersion = nodeps.PHP81 - app.Database = DatabaseDesc{Type: nodeps.MariaDB, Version: nodeps.MariaDB104} case "10": app.PHPVersion = nodeps.PHP83 case "11": diff --git a/pkg/ddevapp/laravel.go b/pkg/ddevapp/laravel.go index 8cec22f687a..c4d9351fdf2 100644 --- a/pkg/ddevapp/laravel.go +++ b/pkg/ddevapp/laravel.go @@ -79,8 +79,9 @@ func laravelPostStartAction(app *DdevApp) error { return nil } -// laravelConfigOverrideAction overrides php_version for Laravel, requires PHP8.2 -func laravelConfigOverrideAction(app *DdevApp) error { - app.PHPVersion = nodeps.PHP82 - return nil -} +// laravelConfigOverrideAction would require PHP8.2 +// but that is now the default for DDEV v1.23+ +//func laravelConfigOverrideAction(app *DdevApp) error { +// app.PHPVersion = nodeps.PHP82 +// return nil +//} diff --git a/pkg/ddevapp/magento.go b/pkg/ddevapp/magento.go index e472be0cc5e..d9a58f94c55 100644 --- a/pkg/ddevapp/magento.go +++ b/pkg/ddevapp/magento.go @@ -160,15 +160,18 @@ func setMagento2SiteSettingsPaths(app *DdevApp) { app.SiteSettingsPath = filepath.Join(app.AppRoot, app.Docroot, "..", "app", "etc", "env.php") } -func magentoConfigOverrideAction(app *DdevApp) error { - app.PHPVersion = nodeps.PHP74 - return nil -} +// magentoConfigOverrideAction is not currently required +// as OpenMage allows PHP up to 8.3 +// See https://github.com/OpenMage/magento-lts#requirements +//func magentoConfigOverrideAction(app *DdevApp) error { +// app.PHPVersion = nodeps.PHP74 +// return nil +//} // Magento2 2.4.6 requires php8.1/2 and MariaDB 10.6 // https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html func magento2ConfigOverrideAction(app *DdevApp) error { - app.PHPVersion = nodeps.PHP81 + app.PHPVersion = nodeps.PHP82 app.Database = DatabaseDesc{Type: nodeps.MariaDB, Version: nodeps.MariaDB106} return nil } diff --git a/pkg/ddevapp/silverstripe.go b/pkg/ddevapp/silverstripe.go index 994ed2e58b6..a49f6f0bbec 100644 --- a/pkg/ddevapp/silverstripe.go +++ b/pkg/ddevapp/silverstripe.go @@ -71,11 +71,9 @@ func getSilverstripeUploadDirs(_ *DdevApp) []string { return uploadDirs } -// silverstripeConfigOverrideAction overrides php_version for Silverstripe, requires PHP8.1 +// silverstripeConfigOverrideAction: Silverstripe prefers Apache +// https://docs.silverstripe.org/en/5/getting_started/#server-requirements func silverstripeConfigOverrideAction(app *DdevApp) error { - app.PHPVersion = nodeps.PHP81 app.WebserverType = nodeps.WebserverApacheFPM - app.Database.Type = nodeps.MariaDB - app.Database.Version = nodeps.MariaDB104 return nil }