> Symfony 5 >

Course Overview

Login to bookmark this course

Lean and Mean Dev with PhpStorm (for Symfony)

Unleash the power of PhpStorm for Symfony. Explore the powerful Symfony plugin, enjoy auto-complete namespaces, and more!

  • 4285 students
  • EN Captions
  • EN Script
  • Certificate of Completion

Your Guides

About this course

This is an older tutorial using an older version of PhpStorm. However, most of the tricks we show in PhpStorm still work beautifully.

What PHP libraries does this tutorial use?

// composer.json
{
    "require": {
        "php": ">=5.3.9, <7.3.0",
        "symfony/symfony": "2.8.*", // v2.8.15
        "doctrine/orm": "^2.4.8", // v2.4.8
        "doctrine/dbal": "<2.5", // v2.4.5
        "doctrine/doctrine-bundle": "~1.4", // 1.6.4
        "symfony/assetic-bundle": "~2.3", // v2.8.1
        "symfony/swiftmailer-bundle": "~2.3,>=2.3.10", // v2.4.2
        "symfony/monolog-bundle": "^3.0.2", // v3.0.2
        "sensio/distribution-bundle": "~5.0", // v5.0.17
        "sensio/framework-extra-bundle": "^3.0.2", // v3.0.18
        "incenteev/composer-parameter-handler": "~2.0" // v2.1.2
    },
    "require-dev": {
        "sensio/generator-bundle": "~3.0", // v3.1.2
        "symfony/phpunit-bridge": "~2.7" // v2.8.15
    }
}

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

Next courses in the Symfony 5: Learn More Tricks section of the Symfony 5 Track!

12 Comments

Sort By
Login or Register to join the conversation
Default user avatar Terry Caliendo 6 years ago

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

2 | Reply |

Hi Terry,

you can use EAP the PhpStorm Early Access Program and have a brand new vesrion for free

https://confluence.jetbrain...

Teo

1 | Reply |

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

| Reply |
Default user avatar disqus_eu5YRLh3By 6 years ago

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.

| Reply |

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 :)

| Reply |
Default user avatar Shairyar Baig 6 years ago

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

| Reply |

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

| Reply |

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

| Reply |

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 :)

| Reply |
Default user avatar Andrew Battye 6 years ago

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?

| Reply |

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/h.... 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!

| Reply |

There is a plugin for all of the JetBrains IDEs that shows keystrokes for Linux, Mac, and Windows. https://plugins.jetbrains.c...

1 | Reply |

Delete comment?

Share this comment

astronaut with balloons in space

"Houston: no signs of life"
Start the conversation!