File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Package provide secure way to temporary switch Debug Mode of your App at any env
8
8
## Features
9
9
Package allows your app to switch to Debug Mode:
10
10
- automatically on localhost's environment by IP,
11
- - semi-automatically on any envirovnemnt where you set ` PHP_APP_DEBUG_MODE ` environment variable (useful for Docker dev-stack),
11
+ - semi-automatically on any environment where you set ` APP_DEBUG ` environment variable (useful for Docker dev-stack),
12
12
- allows you to switch (force turn-on or turn-off) Debug Mode manually.
13
13
14
14
> NOTE: Package is NOT provide any Debug tools directly – it only gives the app whether to switch to debug mode.
@@ -44,17 +44,17 @@ $configurator->setDebugMode($debugModeDetector->isDebugMode());
44
44
> DI Container ready, you cannot use DI for Debug Mode detecting.
45
45
46
46
## Using with Docker
47
- If you building custom Docker image for your devstack, add the environment variable ` PHP_APP_DEBUG_MODE =1` . For example in ` Dockerfile ` file:
47
+ If you building custom Docker image for your devstack, add the environment variable ` APP_DEBUG =1` . For example in ` Dockerfile ` file:
48
48
```
49
- ENV PHP_APP_DEBUG_MODE 1
49
+ ENV APP_DEBUG 1
50
50
```
51
51
> Avoid to publish these image to production!
52
52
53
53
## Using with Docker compose
54
- In your devstack set environment variable ` PHP_APP_DEBUG_MODE =1` . For example in ` docker-compose.yml ` file:
54
+ In your devstack set environment variable ` APP_DEBUG =1` . For example in ` docker-compose.yml ` file:
55
55
``` yaml
56
56
environment :
57
- PHP_APP_DEBUG_MODE : 1
57
+ APP_DEBUG : 1
58
58
` ` `
59
59
60
60
## Manually switch
Original file line number Diff line number Diff line change 10
10
11
11
class DebugModeDetector
12
12
{
13
- private const DEBUG_ENV_NAME = 'PHP_APP_DEBUG_MODE ' ;
13
+ private const DEBUG_ENV_NAME = 'APP_DEBUG ' ;
14
14
15
15
/** @var DebugModeEnabler */
16
16
private $ enabler ;
Original file line number Diff line number Diff line change 17
17
class DebugModeEnabler
18
18
{
19
19
private const STORAGE_FILE = '/debug/token.bin ' ;
20
- private const DEBUG_COOKIE_NAME = 'debug-token ' ;
20
+ private const DEBUG_COOKIE_NAME = 'app- debug-token ' ;
21
21
private const TOKEN_LENGTH = 30 ;
22
22
private const ID_LENGTH = 15 ;
23
23
private const TTL = 3600 ;
You can’t perform that action at this time.
0 commit comments