Inspection issue - "Element div must be declared"

Just upgraded my PHPStorm to 2023.2 (MacOS), and I'm getting a new inspection error across every single PHP view file containing html in my project (anything that contains DOM markup). The error shows up on any top-level DOM elements in the file, commonly a <div> like this:

I have no idea what this is referring to - the file extension for all of these is .php, but that's how it was before. I searched through all PHPStorm inspections, and did not see a single one that matched enough of “Element must be declared” to make any sense.

I searched the Jetbrains forum and Googled, and saw a couple similar issues, but nobody had a resolution. What is this inspection, why is it firing, and if it can't be fixed, can I disable it?

 

0
1 comment

I just removed and re-installed PHPStorm, and from early results, it looks like that may have resolved the issue. Not sure what the problem was and why it was specific to this one strange inspection, but it looks like something may just have been broken with the app install.

0

Please sign in to leave a comment.