diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index f7a341e6e..921f3d3da 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -105,6 +105,56 @@ the `SilverStripe\Forms` namespace. The below sections deal with upgrades to specific parts of various API. Projects which rely on certain API should be upgraded as appropriate using any of the relevant processes documented below. +#### Upgrade of `_ss_environment.php` to `.env` configuration + +The php configuration `_ss_environment.php` file has been replaced in favour of a non-executable +`.env` file, which follows a syntax similar to an `.ini` file for key/value pair assignment. Like +the old php file, `.env` may be placed in either the web root, or one level above. + +For example, if you have the below `_ss_environment.php` file, your `.env` would be rewritten as follows: + +`_ss_environment.php`: + + + :::php + setTemplate()` renamed to `$email->setHTMLTemplate()` * Added `$email->setPlainTemplate` for rendering plain versions of email * `$email->populateTemplate()` has been replaced with `$email->setData()` - - -### Environment management - -See [Environment Management docs](https://docs.silverstripe.org/en/4/getting_started/environment_management/) for full -details. - -The removal of the `_ss_environment.php` file means that conditional logic is no longer available in the environment -varialbe set-up process. This generally encouraged bad practice and should be avoided. If you still require conditional -logic early in the bootstrap, this is best placed in the `_config.php` files. - -#### Environment file changes - -* Removed support for _ss_environment.php in favour of .env and first class environment variables -* Environment variables now can be set in `.env` file placed in webroot or one level above -* Environment variables will be read from the environment as well -* `$_FILE_TO_URL_MAPPING` has been removed and replaced with using `Director.alternate_host` or `SS_HOST` env var