How to configure PHPStorm for PSR-2

Just a quick tip – since Laravel 5.1 now is coming with PSR-2 support (most important change is spaces indent instead of tabs), it makes sense to configure your editor to support that by default, if you haven’t done so already.

To choose Code Style in PHPStorm, you just to to File -> Settings and navigate to that menu.

phpstorm_psr2

Just choose PSR1/PSR2 and you’re good to go!

Like our articles?
Check out our Laravel online courses!

5 COMMENTS

  1. Hi! Sry for question, but i don’t know how do it better.
    I have a choose:
    – stay in my city with Yii2(“basic” knowledge but it’s my potentially first work, no perspectives in this workplace/city, absolutly 😉
    – or study at home for going in another town with good perspectives with Laravel (“start” knowledge, read book Matt Stauffer – Laravel Up and Running, i love this book)

    So, how is it good/bad to learn 2 frameworks toogether? Yii2 to current time and Laravel for future job?
    thx for this post ^^

    • Hi Alejandro, it depends on your current level of knowledge – if you have to LEARN 2 frameworks from scratch, then it’s almost impossible, you will confuse yourself, go for Laravel. But if you know some Yii2 and can work with it, then I would advice to stay with it for a while and learn Laravel bit by bit in your spare time.

  2. I had started to work on Laravel, and was looking up questions/answers in Stack Overflow. I found that there were job adverts for laravel jobs that seemed to be localized to my IP address.

    I found a fine full time job.

LEAVE A REPLY

Please enter your comment!
Please enter your name here