@@ -204,21 +204,20 @@ ide
204
204
205
205
**type **: ``string `` **default **: ``null ``
206
206
207
- If you're using an IDE like TextMate or Mac Vim, then Symfony can turn all
208
- of the file paths in an exception message into a link, which will open that
209
- file in your IDE.
207
+ Symfony can turn file paths seen in dumps and in exception messages into links
208
+ that will open in your preferred text editor or IDE.
210
209
211
- Symfony contains preconfigured URLs for some popular IDEs, you can set them
212
- using the following keys:
210
+ Since every developer uses a different IDE, the recommended way to enable this
211
+ feature is to configure it on a system level. This can be done by setting the
212
+ ``xdebug.file_link_format `` option in your ``php.ini `` configuration file.
213
213
214
- * ``textmate ``
215
- * ``macvim ``
216
- * ``emacs ``
217
- * ``sublime ``
214
+ Alternatively, you can use this ``ide `` configuration key.
218
215
219
- You can also specify a custom URL string. If you do this, all percentage
220
- signs (``% ``) must be doubled to escape that character. For example, if
221
- you use PHPstorm on the Mac OS platform, you will do something like:
216
+ In both cases, the expected configuration value is a URL template that contain an
217
+ ``%f `` where the file path is expected and ``%l `` for the line. When using the
218
+ ``ide `` configuration key, percentages signs (``% ``) must be escaped by doubling
219
+ them. For example, if you use PHPstorm on the Mac OS platform, you will do
220
+ something like:
222
221
223
222
.. configuration-block ::
224
223
@@ -248,18 +247,25 @@ you use PHPstorm on the Mac OS platform, you will do something like:
248
247
'ide' => 'phpstorm://open?file=%%f&line=%%l',
249
248
));
250
249
250
+ .. versionadded :: 3.2
251
+
252
+ When running your app in a container or in a virtual machine, you can tell
253
+ Symfony to map files from the guest to the host by changing their prefix.
254
+ This map should be specified at the end of the URL template::
255
+
256
+ // /guest/.../file will be opened as /host/.../file on the host
257
+ // and /foo/.../file as /bar/.../file also
258
+ 'myide://%f:%l#/guest/=/host/&/foo/=/bar/&...'
259
+
251
260
.. tip ::
252
261
253
- If you're on a Windows PC , you can install the ` PhpStormProtocol `_ to
254
- be able to use this .
262
+ Symfony contains preconfigured URLs for some popular IDEs , you can set them
263
+ using the following values: `` textmate ``, `` macvim ``, `` emacs `` or `` sublime `` .
255
264
256
- Of course, since every developer uses a different IDE, it's better to set
257
- this on a system level. This can be done by setting the ``xdebug.file_link_format ``
258
- in the ``php.ini `` configuration to the URL string.
265
+ .. tip ::
259
266
260
- If you don't use Xdebug, another way is to set this URL string in the
261
- ``SYMFONY__TEMPLATING__HELPER__CODE__FILE_LINK_FORMAT `` environment variable.
262
- If any of these configurations values are set, the ``ide `` option will be ignored.
267
+ If you're on a Windows PC, you can install the `PhpStormProtocol `_ to
268
+ be able to use this.
263
269
264
270
.. _reference-framework-test :
265
271
0 commit comments