0

I do not know why, but in PhpStorm (version 2021.2) one of my php files lost php properties: PhpStorm

And many functions of php are not applied...

Googling I found hints that I have to right-click on this file and select an option like “Mark as php.” But I did not find such option in PhpStorm...

How can I restore it?

Thanks in advance!

Pedro Rodrigues
  • 637
  • 6
  • 16
Petro Gromovo
  • 1,755
  • 5
  • 33
  • 91

1 Answers1

1

You should have an Override file type option when you right-click the file

Override File Type Option

And then you can select PHP.

Override File Type Menu

As a "more permanent" solution you might want to check the File Types in Settings, under Editor, and try to see if there's something weird there.

File Types Settings

You might want to check @LazyOne comment, which contains a SOF post, it might be useful. I also want to say thanks to him for pointing that out and give him credits for the post.

Pedro Rodrigues
  • 637
  • 6
  • 16
  • Where from "Override file type" option available? I did not find it... – Petro Gromovo Jan 04 '22 at 05:11
  • 1
    @PetroGromovo You should have it when you right-click the file in the `Project` menu, on the left. If you don't see it maybe you can associate a key to it in `Keymap` in `Settings`. You have an option there called `Override file type`. – Pedro Rodrigues Jan 04 '22 at 11:59