Code Completion with BeanFactory

I have hated that code completion for field names and relationships doesn't work in PHPStorm when using BeanFactory and while I have found a hundred "workarounds" over the years none have really been great.  This one is pretty close.  See the video to see what I am talking about and what I am looking at to fix it.

https://www.youtube.com/watch?v=BmyRlwd4JFY

Code from the creek...: PHPStorm and Code Completion with BeanFactory 

Parents
  • OK, this can be done with a DocBlock too.  Not sure how this escaped me for 10 years as I have used this for code completion before but I never put two and two together.

    https://www.youtube.com/watch?v=EyxIEu2GfOM

    To do this just go to preferences in PHPStorm and find Live Templates, then follow the steps below

    Step 1

    And the variables

    Step 2

    The newBean template is exactly the same except it leaves out the ID variable.

Reply
  • OK, this can be done with a DocBlock too.  Not sure how this escaped me for 10 years as I have used this for code completion before but I never put two and two together.

    https://www.youtube.com/watch?v=EyxIEu2GfOM

    To do this just go to preferences in PHPStorm and find Live Templates, then follow the steps below

    Step 1

    And the variables

    Step 2

    The newBean template is exactly the same except it leaves out the ID variable.

Children
No Data