For me, this was due to a faulty symlink, which I created on macos with a relative url, instead of the absolute (full) url. The latter did work and showed up as a dir in phpstorm.
The link did work in the Finder, so I thought it was ok. But hovering the unknown filetype showed me a popup saying the symlink was bad