X
X
xbox2015-05-28 12:04:34
symfony
xbox, 2015-05-28 12:04:34

How in phpStrom 8 to correctly designate / set the directory for the project on Symfony 1.2 in the settings so that the IDE sees the framework folder?

Good afternoon.
I am working on a Symfony 1.2 project in phpStorm.
On the local disk, the sources are located in the folders
c:\xampp\htdocs\myproject - project sources
c:\xampp\htdocs\symfony - framework sources
When I add a project to phpStorm I set the root directory for the project, and the directory with the framework lies outside this root directory.
08725edf1d5b48108dc903636c16cef1.png
Basically in the editor to work and so it is possible. Most of the IDE functionality works. But I have suspicions that phpstorm does not analyze the framework sources because they lie outside the project directory. Therefore, the IDE probably "does not know" about the base classes described in the framework, and because of this, in the source code of the project, it may not understand some constructions and consider some of the variables as undefined and so on.
How to correctly set directories for a project in phpStorm so that the IDE sees both the project and the framework?
Please note that phpStorm has built-in support for Symfony2, but no built-in support for earlier versions of Symfony.
While writing, I thought that you can try to put the framework folder inside the project folder. But it's probably not a very pretty solution.
The folder with the framework can be one shared, but there can be several projects. For such a solution, you will have to copy the framework folder to each project and additionally add it to the ignore list of version control systems (GIT / SVN).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
BoShurik, 2015-05-28
@xbox

https://www.jetbrains.com/phpstorm/help/configurin...

Y
Yuri, 2015-05-28
@riky

As already said, it is more correct to keep the frame in the project.
but if you want, like yours, you can add it to External libraries (at the bottom of the project tree)

O
OnYourLips, 2015-05-28
@OnYourLips

When I add a project to phpStorm I set the root directory for the project, and the framework directory is outside of this root directory.

It is not right.
The framework must lie inside the vendor, which is in the project.
I can assume that you are somehow using composer incorrectly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question