Please confirm you have...

2018-08-04
PHP
Hack
Thanks for the report.
Hack files can also use the .php extension. Since Linguist considers each file independently and that file only contains HTML code, it's going to be difficult (impossible?) for Linguist to understand that it is not a Hack file. You can use an override to change that behavior though.
I mean it detects PHP files that contain only HTML as Hack files
Yep, .php files can be either PHP or Hack since both languages use that extension. Linguist usually relies on the content to distinguish between the two. Since the file contains only HTML code, it fails to do so properly.
hey
i have this problem
https://github.com/Arkanic/warriorcats
@Arkanic https://github.com/github/linguist/issues/4229#issuecomment-412847227 applies to your case too.
hey
i have this problem
https://github.com/Arkanic/warriorcats
cause you created a php file that doesn't contain php code, so you need to add some php code
Yep,
.phpfiles can be either PHP or Hack since both languages use that extension. Linguist usually relies on the content to distinguish between the two. Since the file contains only HTML code, it fails to do so properly.
If it can't really decide based on the content, the fallback language should still be the far more popular and original language for that file extension. This is PHP and not Hack. I find the current behaviour very confusing. Took me some time to finally find this issue with an explanation.
I don't mind, it makes me look like I'm using some super secret language while.
Also experiencing this on certain .php files
Thank you
Thanks for this explanation
Should not it be detected as HTML then? What Hack has to do with this?
helpful
Most helpful comment
I mean it detects PHP files that contain only HTML as Hack files