Annoying "resource could not be found in current project" error
Working with TYPO3 CMS I have to use paths that begins with "EXT:" to tell the CMS that the path is relative to an extension.
By instance: "EXT:core/Resources/Public/Icons/icon.svg"
PhpStorm marks this string as an error:
Resource "core/Resources/Public/Icons/icon.svg" could not be found in current project
(note also that it leaves out "EXT:" from the error)
and it also marks with red all the file path in the file tree of the project from the root to the file.
I can't disable it in the inspection preferences.
The only hack that I found is to split the string like this
"EXT:" . "core/Resources/Public/Icons/icon.svg"
but it's really something I don't want to do because the CMS itself is full of this kind of notations.
How can I get rid of this very annoying distraction?
Please sign in to leave a comment.
You can try to:
1) alt+enter on the error
2) right arrow key
3) select "disable inspection" or "suppress for statement"
Thanks but I don't have that option in this case:
Problem solved updating the TYPO3 plugin for Phpstorm.
Btw, an alert about outdated plugins could be very useful.
IDE checks for updates automatically on each launch. Check if the corresponding option is enabled in File | Settings | Appearance & Behavior | System Settings | Updates.
In fact it was disabled. Thanks for your help!