3

I am using phpStorm a while, and now I am experiencing something that doesn't make sense. I always used .ctp files as HTML and php syntax. And it work pretty fine.

But now, I've declared a function as "between", and phpStorm cannot help with any syntax in the between.ctp file.

I mean, if I rename the file to something like "_between", it works, and any other name the syntax works. Just this name doesn't, I do not have any idea of why.

Ok, probably a bug. But I need to figure it out why, and resolve it. I need this function name to be "between"

Thanks in advance.

1 Answer 1

5

This can happen if you accidentally create a file without a file extension.

When you open such a file, PhpStorm will ask you as what format to treat the the file. This will cause it to create a new pattern for the file type and then it will always detect the file as that type.

  1. Open the Settings and search for File Types to switch to the correct settings page.

  2. Check the file types for one that has the pattern "between" and remove it.

    enter image description here

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

2 Comments

Thank you to remember this. But as I said, the file does have .ctp extension. If I just rename to anything else it works, but only "between.ctp" doens't.
@PatrickBard: So, did you check if you have a file type pattern for "between.ctp"?

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.