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-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.