S
S
sl02020-06-03 23:30:15
PHP
sl0, 2020-06-03 23:30:15

How to ignore the framework.yaml part?

I set up a config for ide in framework.yaml:
...
ide: phpstorm://...
The bottom line is that this setting is only needed for local development and I shouldn't upload it to git.
How can I make the remote repository have the original file without this line, and I have it locally with it?
A solution at any level will do - the framework itself or the git.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BoShurik, 2020-06-04
@sl0

In a good way, this is solved through php.ini, as recommended in the documentation

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.

But if you really want to, you can do this:
# services.yaml
imports:
    - { resource: 'local.yaml', ignore_errors: true }

# local.yaml
framework:
    ide: 'phpstorm://open?file=%%f&line=%%l'

# .gitignore
/config/local.yaml

create local.yaml yourself locally and add there all configs that do not need to be committed
Applicable for all versions of symfony*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question