Skip to content

Commit

Permalink
Add configuration for typo3 mail and errors, default to php 7.2, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Jul 4, 2018
1 parent 75e91c4 commit 05111dc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/ddevapp/apptypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func init() {
createWordpressSettingsFile, getWordpressUploadDir, getWordpressHooks, setWordpressSiteSettingsPaths, isWordpressApp, wordpressPostImportDBAction, nil, nil, nil,
},
"typo3": {
createTypo3SettingsFile, getTypo3UploadDir, getTypo3Hooks, setTypo3SiteSettingsPaths, isTypo3App, nil, nil, nil, nil,
createTypo3SettingsFile, getTypo3UploadDir, getTypo3Hooks, setTypo3SiteSettingsPaths, isTypo3App, nil, typo3ConfigOverrideAction, nil, nil,
},
"backdrop": {
createBackdropSettingsFile, getBackdropUploadDir, getBackdropHooks, setBackdropSiteSettingsPaths, isBackdropApp, backdropPostImportDBAction, nil, nil, nil,
Expand Down
18 changes: 17 additions & 1 deletion pkg/ddevapp/typo3.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] = array_merge($GLOBA
'password' => 'db',
'port' => '3306',
'user' => 'db',
]);`
]);
// This mail configuration sends all emails to mailhog
$GLOBALS['TYPO3_CONF_VARS']['MAIL'] = [
'transport' => 'smtp',
'transport_smtp_server' => 'localhost:1025',
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] = '*';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors'] = 1;
`

// createTypo3SettingsFile creates the app's LocalConfiguration.php and
// AdditionalConfiguration.php, adding things like database host, name, and
Expand Down Expand Up @@ -123,3 +133,9 @@ func isTypo3App(app *DdevApp) bool {
}
return false
}

// typo3ConfigOverrideAction sets a safe php_version for TYPO3
func typo3ConfigOverrideAction(app *DdevApp) error {
app.PHPVersion = "7.2"
return nil
}

0 comments on commit 05111dc

Please sign in to comment.