DOCS Corrected env type docs (fixes #7290)

This commit is contained in:
Ingo Schommer 2017-08-30 08:35:41 +12:00
parent 34aede5197
commit 64af679c35
4 changed files with 6 additions and 36 deletions

View File

@ -12,14 +12,8 @@ detailed error messages for security reasons. You'll typically need to get your
information.
If you can log-in to the CMS as an administrator, append `?isDev=1` to any URL to temporarily set your browsing session into
"dev mode". If you can't log-in in the first place because of the error, add this directive to your `mysite/_config/config.yml`
(don't forget to remove it afterwards!):
```yml
Director:
# temporary debugging statement
environment_type: 'dev'
```
"dev mode". If you can't log-in in the first place because of the error, please
configure an `SS_ENVIRONMENT_TYPE` through [environment-management] (don't forget to remove it afterwards!).
<div class="warning" markdown='1'>
On "live" environments, the `?isDev=1` solution is preferred, as it means that your other visitors don't see ugly

View File

@ -4,22 +4,8 @@ summary: Configure your SilverStripe environment to define how your web applicat
# Environment Types
SilverStripe knows three different environment types (or "modes"). Each of the modes gives you different tools
and behaviors. The environment is managed either through a [YML configuration file](../configuration) or in a
and behaviors. The environment is managed either through an
[environment configuration file](../../getting_started/environment_management).
The definition of setting an environment type in a `mysite/_config/app.yml` looks like
```yml
SilverStripe\Control\Director:
environment_type: 'dev'
```
The definition of setting an environment type in a `.env` file looks like
```
SS_ENVIRONMENT_TYPE="dev"
```
The three environment types you can set are `dev`, `test` and `live`.
### Dev

View File

@ -1797,9 +1797,11 @@ that it belongs to, e.g. `themes/mytheme/templates/MyVendor/Foobar/Model/MyModel
All static methods have been removed, and the `inst_` prefix removed from all instance members.
Please see the upgrading section on Session object for more details.
* `Director.rules` config no longer support `redirect:<url>` directly via config.
* `Director::get_environment_type()` and `Director::set_environment_type()` are removed.
* `Director::get_environment_type()` and `Director::set_environment_type()` are removed.
Get the `Kernel` instance via injector and query `getEnvironment()` instead.
E.g. `$type = Injector::inst()->get(Kernel::class)->getEnvironment();`.
* The environment can no longer be configured via YAML (`Director.environment_type`).
Use a [.env file](/getting_started/environment_management) to manage environment settings.
* Many global methods have been refactored into `Environment` or `Convert` class.
* `increase_xdebug_nesting_level_to` removed (functionality has been inlined into `AppKernel`)
* `set_increase_time_limit_max` moved to `Environment::setTimeLimitMax()`

View File

@ -22,12 +22,8 @@ use SilverStripe\View\TemplateGlobalProvider;
* The most important part of director is {@link Director::handleRequest()}, which is passed an HTTPRequest and will
* execute the appropriate controller.
*
* Director also has a number of static methods that provide information about the environment, such as
* {@link Director::$environment_type}.
*
* @see Director::handleRequest()
* @see Director::$rules
* @see Director::$environment_type
* @skipUpgrade
*/
class Director implements TemplateGlobalProvider
@ -98,14 +94,6 @@ class Director implements TemplateGlobalProvider
*/
private static $default_base_url = '`SS_BASE_URL`';
/**
* Assigned environment type
*
* @internal
* @var string
*/
protected static $environment_type;
public function __construct()
{
}