Skip to content

Commit

Permalink
Increase default PHP version to 7.4 for project type typo3
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertsoft committed Dec 20, 2020
1 parent db9d6d7 commit 3c85c2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ddevapp/apptypes.go
Expand Up @@ -2,12 +2,12 @@ package ddevapp

import (
"fmt"
"github.com/drud/ddev/pkg/nodeps"
"os"
"path"
"path/filepath"
"sort"

"github.com/drud/ddev/pkg/nodeps"
"github.com/drud/ddev/pkg/util"
)

Expand Down Expand Up @@ -83,7 +83,7 @@ func init() {
settingsCreator: createWordpressSettingsFile, uploadDir: getWordpressUploadDir, hookDefaultComments: getWordpressHooks, apptypeSettingsPaths: setWordpressSiteSettingsPaths, appTypeDetect: isWordpressApp, postImportDBAction: nil, configOverrideAction: nil, postConfigAction: nil, postStartAction: wordpressPostStartAction, importFilesAction: wordpressImportFilesAction,
},
nodeps.AppTypeTYPO3: {
settingsCreator: createTypo3SettingsFile, uploadDir: getTypo3UploadDir, hookDefaultComments: getTypo3Hooks, apptypeSettingsPaths: setTypo3SiteSettingsPaths, appTypeDetect: isTypo3App, postImportDBAction: nil, configOverrideAction: nil, postConfigAction: nil, postStartAction: typo3PostStartAction, importFilesAction: typo3ImportFilesAction,
settingsCreator: createTypo3SettingsFile, uploadDir: getTypo3UploadDir, hookDefaultComments: getTypo3Hooks, apptypeSettingsPaths: setTypo3SiteSettingsPaths, appTypeDetect: isTypo3App, postImportDBAction: nil, configOverrideAction: typo3ConfigOverrideAction, postConfigAction: nil, postStartAction: typo3PostStartAction, importFilesAction: typo3ImportFilesAction,
},
nodeps.AppTypeBackdrop: {
settingsCreator: createBackdropSettingsFile, uploadDir: getBackdropUploadDir, hookDefaultComments: getBackdropHooks, apptypeSettingsPaths: setBackdropSiteSettingsPaths, appTypeDetect: isBackdropApp, postImportDBAction: backdropPostImportDBAction, configOverrideAction: nil, postConfigAction: nil, postStartAction: backdropPostStartAction, importFilesAction: backdropImportFilesAction, defaultWorkingDirMap: docrootWorkingDir,
Expand Down
11 changes: 11 additions & 0 deletions pkg/ddevapp/typo3.go
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/drud/ddev/pkg/archive"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/nodeps"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
)
Expand Down Expand Up @@ -163,6 +164,16 @@ func isTypo3App(app *DdevApp) bool {
return false
}

// typo3ConfigOverrideAction overrides php_version since v11 is compatible with
// PHP 7.4. This will conflict versions older than 8.7 but this should not be a
// real issue because 8.7 and older are in ELTS mode and not longer supported
// by the community. Also users of such old versions can set the PHP version
// explicit.
func typo3ConfigOverrideAction(app *DdevApp) error {
app.PHPVersion = nodeps.PHP74
return nil
}

// typo3ImportFilesAction defines the TYPO3 workflow for importing project files.
// The TYPO3 import-files workflow is currently identical to the Drupal workflow.
func typo3ImportFilesAction(app *DdevApp, importPath, extPath string) error {
Expand Down

0 comments on commit 3c85c2e

Please sign in to comment.