@@ -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 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 contains an
217
+ ``%f `` where the file path is expected and ``%l `` for the line number. When using
218
+ the ``ide `` configuration key, percentages signs (``% ``) must be escaped by
219
+ doubling them. For example, if you use PHPstorm on the Mac OS platform, you will
220
+ do something like:
222
221
223
222
.. configuration-block ::
224
223
@@ -250,16 +249,28 @@ you use PHPstorm on the Mac OS platform, you will do something like:
250
249
251
250
.. tip ::
252
251
253
- If you're on a Windows PC, you can install the `PhpStormProtocol `_ to
254
- be able to use this.
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 after a ``# ``
255
+ using JSON-like key/values::
256
+
257
+ // /path/to/guest/.../file will be opened
258
+ // as /path/to/host/.../file on the host
259
+ // and /foo/.../file as /bar/.../file also
260
+ 'myide://%f:%l#"/path/to/guest/":"/path/to/host/","/foo/":"/bar/"...'
261
+
262
+ .. versionadded :: 3.2
263
+ Guest to host mappings were introduced in Symfony 3.2.
264
+
265
+ .. tip ::
266
+
267
+ Symfony contains preconfigured URLs for some popular IDEs, you can set them
268
+ using the following values: ``textmate ``, ``macvim ``, ``emacs `` or ``sublime ``.
255
269
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.
270
+ .. tip ::
259
271
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.
272
+ If you're on a Windows PC, you can install the `PhpStormProtocol `_ to
273
+ be able to use this.
263
274
264
275
.. _reference-framework-test :
265
276
0 commit comments