From 2888eda9eebb502fca16a59ae9add9a60d637fd7 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 29 Nov 2016 11:16:51 +0100 Subject: [PATCH 1/3] Updated the explanation about framework.ide --- reference/configuration/framework.rst | 45 ++++++++++++++------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 54ffd717f00..8ceb1120656 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -208,25 +208,21 @@ ide **type**: ``string`` **default**: ``null`` -Symfony can turn file paths seen in dumps and exception messages into links -that will open in your preferred text editor or IDE. +Symfony turns file paths seen in variable dumps and exception messages into +links that open those files right inside your browser. If you prefer, you can +open those files in your favorite IDE or text editor. -Since every developer uses a different IDE, the recommended way to enable this -feature is to configure it on a system level. This can be done by setting the -``xdebug.file_link_format`` option in your ``php.ini`` configuration file. +Set this option to any of these values preconfigured for the most popular editors: +``phpstorm`` (requires `PhpStormProtocol`_), ``sublime``, ``textmate``, +``macvim`` and ``emacs``. -.. tip:: +If you use another editor, the expected configuration value is a URL template +that contains an ``%f`` placeholder where the file path is expected and ``%l`` +placeholder for the line number (percentages signs (``%``) must be escaped by +doubling them to prevent Symfony from interpreting them as container parameters). - Setting the ``xdebug.file_link_format`` ini option works even if the Xdebug - extension is not enabled. - -Alternatively, you can use this ``ide`` configuration key. - -In both cases, the expected configuration value is a URL template that contains an -``%f`` where the file path is expected and ``%l`` for the line number. When using -the ``ide`` configuration key, percentages signs (``%``) must be escaped by -doubling them. For example, if you use PHPstorm on the Mac OS platform, you will -do something like: +For example, if you use PHPstorm on the Mac OS platform, you can use this +configuration: .. configuration-block:: @@ -256,6 +252,17 @@ do something like: 'ide' => 'phpstorm://open?file=%%f&line=%%l', )); +Since every developer uses a different IDE, the recommended way to enable this +feature is to configure it on a system level. This can be done by setting the +``xdebug.file_link_format`` option in your ``php.ini`` configuration file. The +format to use is the same as for the ``framework.ide`` option, but without the +need to escape the percent signs (``%``) by doubling them. + +.. tip:: + + Setting the ``xdebug.file_link_format`` ini option works even if the Xdebug + extension is not enabled. + .. tip:: When running your app in a container or in a virtual machine, you can tell @@ -271,12 +278,6 @@ do something like: .. versionadded:: 3.2 Guest to host mappings were introduced in Symfony 3.2. -.. tip:: - - Symfony contains preconfigured URLs for some popular IDEs, you can set them - using the following values: ``phpstorm`` (requires `PhpStormProtocol`_), - ``sublime``, ``textmate``, ``macvim`` or ``emacs``. - .. _reference-framework-test: test From 8d9ecc218b0e4ad45ab0c554dcd7397dc96cdd74 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 29 Nov 2016 11:39:47 +0100 Subject: [PATCH 2/3] Fixed typo --- reference/configuration/framework.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 8ceb1120656..9042fbb0fac 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -218,7 +218,7 @@ Set this option to any of these values preconfigured for the most popular editor If you use another editor, the expected configuration value is a URL template that contains an ``%f`` placeholder where the file path is expected and ``%l`` -placeholder for the line number (percentages signs (``%``) must be escaped by +placeholder for the line number (percentage signs (``%``) must be escaped by doubling them to prevent Symfony from interpreting them as container parameters). For example, if you use PHPstorm on the Mac OS platform, you can use this From 8de1ef3c37a608a3ac00c5cd1d28e120fc0102f5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 9 Dec 2016 17:25:30 +0100 Subject: [PATCH 3/3] Minor reword and explained what happens when you define both paramters --- reference/configuration/framework.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 9042fbb0fac..39331088285 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -209,21 +209,16 @@ ide **type**: ``string`` **default**: ``null`` Symfony turns file paths seen in variable dumps and exception messages into -links that open those files right inside your browser. If you prefer, you can -open those files in your favorite IDE or text editor. - -Set this option to any of these values preconfigured for the most popular editors: -``phpstorm`` (requires `PhpStormProtocol`_), ``sublime``, ``textmate``, -``macvim`` and ``emacs``. +links that open those files right inside your browser. If you prefer to open +those files in your favorite IDE or text editor, set this option to any of the +following values: ``phpstorm`` (requires `PhpStormProtocol`_), ``sublime``, +``textmate``, ``macvim`` and ``emacs``. If you use another editor, the expected configuration value is a URL template that contains an ``%f`` placeholder where the file path is expected and ``%l`` placeholder for the line number (percentage signs (``%``) must be escaped by doubling them to prevent Symfony from interpreting them as container parameters). -For example, if you use PHPstorm on the Mac OS platform, you can use this -configuration: - .. configuration-block:: .. code-block:: yaml @@ -258,6 +253,11 @@ feature is to configure it on a system level. This can be done by setting the format to use is the same as for the ``framework.ide`` option, but without the need to escape the percent signs (``%``) by doubling them. +.. note:: + + If both ``framework.ide`` and ``xdebug.file_link_format`` are defined, + Symfony uses the value of the ``framework.ide`` option. + .. tip:: Setting the ``xdebug.file_link_format`` ini option works even if the Xdebug