-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate noinspections PHPStorm tags #905
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, seems "practically useful".
(although personally I've been living with this warning for years and no team member ever complained, but 🤷♀️)
However: could you please add a test for this? Thanks!
Wait, why does it need both? I'm on 2020.1 Beta and only |
Sure, I will write a test tomorrow ;) As for This is for relations basically, they are also FQN but all models are usually in the same namespace so FQN is not necessary and PHPStorm removes their namespaces on code cleanup/code reformat. |
Thanks for the details! I think it would be great if you could add this as a code comment with the block thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
ping @barryvdh
Is there any chance for this to be merged in the near future? |
When using write option for models eq
Generated PHPDoc has fully qualified names, about which PHPStorm complains (as it should). However, this is problematic since later during automatic code cleanup tasks these names are replaced with
use
statements. This generates unnecessary changes in the files, especially if some developers forget to run code cleanup. Later on, all of this stays in the git history.As a solution, this PR adds a new option to the model command.
--phpstorm-noinspections
egThis will include two PHPStorm inspections at the end of the PHPDoc comment
which will stop PHPStorm from replacing the autogenerated FQN with use statements.