Not in the project - missing route
I'm working on a project we have developped. I opened a New project in PhpStorm, and connect to my Github. I pulled the project, and try to work with.
It's a project using Symfony5, called Olymphys-4 (website olymphys.fr, github : DenisPIcard/Olymphys-4)
Each time I try to edit a script , PhpStorm say : it's not in the project, should I edit anyway ?
The Each route yet in the project is highlighted, with "Missing route"
Each time I try to commit the project, the routes are in error, and I have to force the commit.
And, in spite of it all, when I execute my project with "symfony serve", every thing works fine...
The debug:router find all the routes...
Where is my issue ?
Please sign in to leave a comment.
Could you please show a screenshot from the "Preferences/Settings > Directories" window, do you have any directories there?
Thanks for tour reply.
That is the screenshot
@Denis Picard
Accordingly to your screenshot it's absolutely empty... which is wrong (by default every project consists of one Content Root)
Do you also have a yellowish kind of color background in the Project View panel?
Right now it looks like your project config is somehow corrupted and the IDE treats all files as "outside of the project". Try using "Add Content Root" there and point to the project root folder.
If that does not help -- I may suggest the following:
This is something that occasionally happens nowadays but we cannot catch the pattern yet. However, as Andriy has fairly suggested, the ".idea" folder re-creation helps in most of these cases.
By the way, before re-creating the ".idea" folder, could you please check if there is a "modules.xml" file inside?
Thanks, I will try that.
@Vassily :
@Denis Picard
Do you have that Olymphys4.iml file (from that old/"broken" state)? Can you show it here similar to the above?
@...:
<?xml version="1.0" encoding="UTF-8"?> <module version="4"> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" /> <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="App\Tests\" /> </content> <orderEntry type="sourceFolder" forTests="false" /> </component> </module>@Denis Picard
Thanks. The only notable difference I can see is that your file does not have type="WEB_MODULE" part:
Maybe it will give some hints to JetBrains devs...
Thanks for your concern.
I've tried...
First, in Settings>Directories, I added, by mistake, the repertory of my templates.
Then, reading better your reply, I've addd my root repertory. Trying to remove the other, I have removed it from the project !
Then, I have followed your reply : baclup an remove the .idea, but I can't remove the all project...
And trying to recover the idea file, the anwer is : There is a file named .idea, But I can't find id !!!
Anyway, my project runs...