Lean and Mean Dev with PhpStorm (for Symfony)

Have you ever written out a long use statement by hand or navigated deep directories to find a file? Then your development is about to get a lot faster.

PhpStorm makes modern Php development a joy - especially for Symfony2 users. In this tutorial, we'll use PhpStorm to take a lot of the grunt work out of your coding and help you get things done faster:

  • Get the life-changing Symfony plugin
  • Auto-complete namespaces (please stop typing them)!
  • Tricks for annotations, Doctrine, forms, Twig and more
  • Refactoring
  • Live Templates
  • Fast navigation
  • Symfony service integration
  • .... (and always) well-intentioned jokes.

Your Guides

Ryan Weaver Leanna Pelham

Questions? Conversation?

  • 2016-10-28 weaverryan

    That's REALLY nice, but unfortunately we don't. I've inquired about it before... but I remember it being much more for BIG companies with sales people running around :).

  • 2016-10-26 Terry Caliendo

    I'm about to purchase PHP Storm because of your tutorials. Do you have a reseller account so that I can get you some credit?

    https://www.jetbrains.com/comp...

  • 2016-10-24 weaverryan

    Hey Andrew!

    I've thought about this before and it's a great idea, but also not super easy to add (the Mac keyboard shortcuts are added "for free" thanks to our screen-recording software that records key-strokes). But, PhpStorm's documentation handles this stuff really well. For example: https://www.jetbrains.com/help.... You can select your KeyMap in the upper right (you can see that there are actually *many*) and it'll convert the page for you. You can also go to Help->Keymap Reference in PhpStorm to get a really nice PDF of your system's shortcuts (I find this one particularly helpful).

    So, not exactly what you were hoping for - but I hope it's a bit useful :).

    Cheers!

  • 2016-10-24 Andrew Battye

    Just a minor point: Would it be possible to display the keyboard shortcuts for the Windows and Linux versions of PHPStorm alongside the Mac versions?

  • 2016-05-22 weaverryan

    This is perfect Paulo! In Symfony 3, a few things changed in the form component, and you made the proper updates for that version. Thanks for sharing :)

  • 2016-05-22 Paulo Gouveia

    Hi Ryan, once again, thanks for the tutorial Lean and Mean Dev with PhpStorm (for Symfony).

    This time I had some trouble to follow the tutorial on the chapter 6 (Forms). I think that is a version problem (I'm using symfony 3), but I changed the code and everything worked fine.

    I decided to contribute and publish the changes to solve the problem. So, if someone else find the same problem, they will know how to fix it.

    Actually I found two problems:

    1st) In the line 13 (from the Class MovieType), using the code "... ->add('title', 'text') ...", the PHPStorm was warning with the message: "Type names were deprecated use fully-qualified class name (FQCN) instead".

    Instead to use that code, I used this one: "... ->add('title', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') ..."; and I changed the following lines too.

    2nd) In the line 19 (from the Class MovieController), the code "... $form = $this->createForm(new MovieType(), $movie); ...", results on the page:

    "Expected argument of type "string", "AppBundle\Form\MovieType" given

    500 Internal Server Error - UnexpectedTypeException"

    so I changed for: "... $form = $this->createForm(MovieType::class, $movie); ...", and worked OK.

    I really don't know if is this the better way to solve the problem, I just hope help and contribute with someone else.

    Thanks again Ryan for your iniciative.

  • 2015-07-15 weaverryan

    Ha, you found it within a few minutes of deploying! This edit button is even more important to have now for the open source Guard stuff :)

  • 2015-07-15 Victor Bocharsky

    Congrats with "Edit on GitHub" button for pages! It's a great feature! I've been waiting for this for a long time :)

  • 2015-07-15 weaverryan

    I learned some more tricks prepping for this - there's so much great stuff hiding in there :). A lot more chapters (than the 2 right now) yet to come out on this...

  • 2015-07-15 Shairyar Baig

    This should be interesting. I already use PhpStorm, look forward to what new tricks I can learn.