Skip to content

[Framework] Read env var SYMFONY_IDE by default for framework.ide #16315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ some environment variable that stores the name of the IDE/editor:
# config/packages/framework.yaml
framework:
# the env var stores the IDE/editor name (e.g. 'phpstorm', 'vscode', etc.)
ide: '%env(resolve:CODE_EDITOR)%'
ide: '%env(resolve:SYMFONY_IDE)%'

.. code-block:: xml

Expand All @@ -184,7 +184,7 @@ some environment variable that stores the name of the IDE/editor:
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<!-- the env var stores the IDE/editor name (e.g. 'phpstorm', 'vscode', etc.) -->
<framework:config ide="%env(resolve:CODE_EDITOR)%"/>
<framework:config ide="%env(resolve:SYMFONY_IDE)%"/>
</container>

.. code-block:: php
Expand All @@ -194,9 +194,14 @@ some environment variable that stores the name of the IDE/editor:

return static function (FrameworkConfig $framework) {
// the env var stores the IDE/editor name (e.g. 'phpstorm', 'vscode', etc.)
$framework->ide('%env(resolve:CODE_EDITOR)%');
$framework->ide('%env(resolve:SYMFONY_IDE)%');
};

.. versionadded:: 6.1

The environment variable `SYMFONY_IDE` was introduced in Symfony 6.1.
It is read by default when `framework.ide` config is not set.

Another alternative is to set 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
Expand Down