@@ -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 should
217
+ contain an ``%f `` where the file path is expected and ``%l `` for the line. When
218
+ using 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
@@ -248,18 +247,28 @@ 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 path prefixes from the guest to the host. This map should be
254
+ specified after a ``# `` using URL-encoding::
255
+
256
+ phpstorm://open?file=%%f&line=%%l#/guest/path1/=/host/path2/&/guest/path2/=/host/path2/&...
257
+
251
258
.. tip ::
252
259
253
- If you're on a Windows PC , you can install the ` PhpStormProtocol `_ to
254
- be able to use this.
260
+ Symfony contains preconfigured URLs for some popular IDEs , you can set them
261
+ using the following values:
255
262
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.
263
+ * ``textmate ``
264
+ * ``macvim ``
265
+ * ``emacs ``
266
+ * ``sublime ``
259
267
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.
268
+ .. tip ::
269
+
270
+ If you're on a Windows PC, you can install the `PhpStormProtocol `_ to
271
+ be able to use this.
263
272
264
273
.. _reference-framework-test :
265
274
0 commit comments