/
INSTALL
74 lines (48 loc) · 1.8 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
1. In the composer.json file in require-dev
put "jlle/env-info": "^0.1.2"
It is important that you do not put yourself in
"requires": {
}
In autoload-dev from the composer.json file put
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/",
"Jlle\\EnvInfo\\": "vendor/jlle/env-info/src/"
}
},
2. At the root of the project and at the same level as composer.json
create an empty file with the name: envinfopass
This is so that even in a development environment, the information cannot be accessed if this file does not exist.
In production should not be created
3. In the config/routes.yaml file
Introduce:
envinfo:
path: /envinfo
methods: GET
controller: Jlle\EnvInfo\Controller\EnvInfoController::envInfo
4. In the config/services.yaml file
Introduce:
Jlle\EnvInfo\:
resource: '../vendor/jlle/env-info/src/'
Example of services.yaml file:
parameters:
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
Jlle\EnvInfo\:
resource: '../vendor/jlle/env-info/src/'
then you will have to launch composer install
The url to see the variables depending on the configured environment is
http://localhost/envinfo
remember that if you have specified a port you should put it
http://localhost:8000/envinfo