Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm - can't open a PHP file if the name is "myclass.php"

Tags:

file

php

phpstorm

I've a really CRAZY issue with PhpStorm, and I don't know how to solve it.

I have an empty php file called "myclass.php" which seems not recognized by PhpStorm because the icon is a "?".

When I try to open this file with PhpStorm, the mouse starts doing flicker and my IDE freezes until I restart it... However, I can open the file from any other IDE like notepad. Also, I am the only one having this issue, because my other team workers can open the file with their PhpStorm IDE.

BUT, when I rename the file to "myclass2.php", the icon changes like my other php files, and I am able to open it.

It's precisely when the file is called "myclass.php" that the issue is triggered.

I tried :

  • File/Invalidate Cache / Restart
  • Uninstall/install PhpStorm
  • Move the file into another folder
  • Drop/Recreate my project
  • Delete/Create the file with the same name with another IDE...
  • Create the same file in another project
  • Searching for an encoding issue

Someone knows how to solve this crazy issue ? :(

Thanks you.

like image 634
Bapt Avatar asked Sep 13 '25 09:09

Bapt


1 Answers

Please go to File | Settings (or PhpStorm | Preferences) | Editor | File Types, find there "Files Opened In Associated Applications" and check if myclass.php is registered there as pattern. If it's there then just remove it and it will be fixed.

like image 107
Vlad Luchansky Avatar answered Sep 16 '25 00:09

Vlad Luchansky