@@ -74,14 +74,41 @@ Web front-controller::
74
74
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
75
75
// ...
76
76
77
+ .. _override-bin-dir :
78
+
79
+ Override the Binary Directory
80
+ -----------------------------
81
+
82
+ You can change the binary directory by adding the ``extra.bin-dir `` option
83
+ in the ``composer.json `` file:
84
+
85
+ .. code-block :: json
86
+
87
+ {
88
+ "..." : " ..." ,
89
+ "extra" : {
90
+ "..." : " ..." ,
91
+ "bin-dir" : " my_new_bin_dir"
92
+ }
93
+ }
94
+
77
95
.. _override-config-dir :
78
96
79
97
Override the Configuration Directory
80
98
------------------------------------
81
99
82
- The configuration directory is the only one which cannot be overridden in a
83
- Symfony application. Its location is hardcoded as the ``config/ `` directory
84
- at your project root directory.
100
+ You can change the configuration directory by adding the ``extra.config-dir `` option
101
+ in the ``composer.json `` file:
102
+
103
+ .. code-block :: json
104
+
105
+ {
106
+ "..." : " ..." ,
107
+ "extra" : {
108
+ "..." : " ..." ,
109
+ "config-dir" : " my_new_config_dir"
110
+ }
111
+ }
85
112
86
113
.. _override-cache-dir :
87
114
@@ -147,6 +174,34 @@ Here you have changed the location of the directory to ``var/{environment}/log/`
147
174
You can also change the log directory defining an environment variable named
148
175
``APP_LOG_DIR `` whose value is the full path of the log folder.
149
176
177
+ .. _override-src-dir :
178
+
179
+ Override the Source Directory
180
+ -----------------------------
181
+
182
+ You can change the source directory by adding the ``extra.src-dir `` option
183
+ and updating the ``autoload.psr-4 `` option in the ``composer.json `` file:
184
+
185
+ .. code-block :: json
186
+
187
+ {
188
+ "..." : " ..." ,
189
+ "autoload" : {
190
+ "psr-4" : {
191
+ "App\\ " : " my_new_src_dir/"
192
+ }
193
+ },
194
+ "extra" : {
195
+ "..." : " ..." ,
196
+ "src-dir" : " my_new_src_dir"
197
+ }
198
+ }
199
+
200
+ .. tip ::
201
+
202
+ Don't forget to run the ``composer dump-autoload `` command once ``autoload.psr-4 ``
203
+ has been changed.
204
+
150
205
.. _override-templates-dir :
151
206
152
207
Override the Templates Directory
0 commit comments