0

I do not know what happened with my PHP file in PhpStorm 2019.2.3, but it does not work with it as with php file. I mean lack of context help, code reformat etc...

enter image description here

Which options did I changes and how to restore it?

Actually that is problem with only 1 file, the rest are OK.

7
  • The file context menu has an option “Mark as Plain Text”, most likely you activated that by accident … In that case, it should show “Mark as PHP” now. Commented Jan 14, 2020 at 12:17
  • See stackoverflow.com/a/22709627/783119 or stackoverflow.com/a/56144533/783119 Commented Jan 14, 2020 at 12:18
  • @04FS It's a bit different -- if that action was used it should have a bit different icon (extra "X" in the icon corner or something like that) Commented Jan 14, 2020 at 12:20
  • @LazyOne well .php files should probably not show a circle with a C in it as default icon either … hard to tell how they (mis-)configured their IDE here from just a screenshot that shows only the “problem”. Commented Jan 14, 2020 at 12:23
  • 1
    @04FS regrading "a circle with a C in it" -- it's shown for PHP files that contains a single class and its name matches the file name. You will see different icons for Traits, Interfaces, Abstract Classes and more -- jetbrains.com/help/phpstorm/symbols.html. If such special condition is not met, then .php file will have normal PHP File icon (just like artisan file form the screenshot has). Commented Jan 14, 2020 at 12:40

3 Answers 3

3

You accidentally marked it as text, please check your Settings | Editor | File Types | Text for the filename.

Sign up to request clarification or add additional context in comments.

Comments

1

you marked it as plain text. right click on the file and select mark as php

Comments

0

You need to install PHP Extension on it and restart your PhpStorm

if already install PHP Extension then check on the right bottom and select PHP instead of Plain Text

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.