I am working on a Laravel project with vanilla Blade templates, jQuery & Bootstrap.
After the recent update, I am no longer getting CSS class auto-completions for Bootstrap in my Blade view:
I have tried the following:
- Invalidate the cache
- Reset the
.idea
folder (fresh import) - Marked the resource root folder correctly
- Checked to see if power save mode is disabled
- Tried installing the
Laravel
plugin
The CSS files are brought into my view/layout using the Laravel’s asset()
helper like this:
<link href="{{ asset('plugins/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/app-style.css') }}" rel="stylesheet"/>
Is there a way to tell PhpStorm to do code suggestion from my project’s resource root? It doesn’t seem to introspect my CSS files when imported like this, strangely this worked before in the older version of the PhpStorm.
2
Answers
It is a bug in PhpStorm 2024.1. https://youtrack.jetbrains.com/issue/WI-76922
It has been fixed already and will be available in the next minor update 2024.1.1 (later this month, on or around April 23 AFAIK)
If this feature is critical for you, consider downgrading to 2023.3.6 for the time being: https://www.jetbrains.com/phpstorm/download/other.html
For those who can’t wait
Since yesterday, there is a new Release candidate for the version 2024.1.1
This version has the Bug-Fix implemented and it seems working well.
Install PHPStorm 2024.1.1
Install using the Toolbox App
Use the Jetbrains Toolbox and choose the 2024.1.1 in "Other versions".
Beware, Release-Candidates are not stable versions.
It looks like the RC versions can now only be installed via the Jetbrains Toolbox app.
The PHPStorm blog in the EAP section announced in the last RC version that a valid PHPStorm version is required.