使用Symfony插件在PhpStorm中创建表单文件

I'm currently working on a tutorial for PhpStorm with Symfony... but I'm stuck :/

https://knpuniversity.com/screencast/phpstorm/forms#play

I cant create a form file with the Symfony plugin (like at the very beginning of the tutorial link), when I press Cmd + N on the appbundle and the click on form (with the Symfony logo...) nothing happens - PhpStorm doesn't respond and create a new file...

Can anyone help me with that please?

I reinstalled the plugin already and rebooted and so on...

You have to set your project as symfony project first:

file > settings > langages & framework > Symfony and then enable it

I am assuming that you are editing files locally and then uploading them to a webserver - rather than editing the webroot directly. If the latter then my suggestion is unlikely to help.

I was able to fix it by;

Closing the project in Symfony.

Creating a new project from my existing remote files, in a new local repository

Downloading the files from my development server to my local repository (my dev server is actually a VM hosted on my development machine, but I don't think that is important).

Allowing phpstorm to do its normal startup stuff recognising namespaces

Enabling the symfony plugin in File/Settings/Languages & Frameworks/Symfony

I did not need to restart phpstorm although the plugin says you need to to enable plugin for the project

This fixed the problem for me, and also fixed a certain amount of Symfony specific 'autocomplete' which wasn't working for me either.