It's only hated by those who haven't grokked modern php > 7.0. Thanks to laravel the php ecosystem has grown quite a bit over the past few years. I know many rails devs who prefer laravel/php to rails for what it brings to the table. Sure ruby is prettier syntax, but php isn't as horrible as it used to be. Now if it could catch up on parallel/asynch it'd have a better time.
Sure there's sexier languages like elixir and go and rust, but well designed php code is a pleasure to work w/.
yeah, I'm working on one now (picking up where Indian devs left off) ...
Code is laravel 5.2, every controller injects session, requests, etc into the constructor, then injects a 'manager' which is basically a loose repository structure, laravel 5.3 > somewhere makes it so using requests/sessions in constructor you generally want to wrap that in middlware...
So upgrading is a huge nightmare. This is one reason I'm not a fan of repository pattern, more classes to inject everywhere even when they're not fully needed. When just making a fatter model would suffice.
Also lots of bad php practices...everywhere else. Bad devs can work on any code base, but laravel core code is pretty beautiful, and laravel's community encourages better code, if some bad actors write shitty code the rest of us have to clean up that's on them, but woocommerce is owned by Automattic and has bad code, you'd think they'd fix it or something being a large company.
There's also tons of great packages out there that are written way more OO and with testing and best practices than there are for wordpress. Laravel is also easier to optimize, and the data structure for wordpress can get out of hand as well.
ltdr; Yes, lots of bad laravel code -- but that's on the individual dev, core laravel and lots of laravel packages use php best practices and encourage good coding. Easier to write better code in laravel than it is a wordpress plugin.
Comments
Not to the degree that PHP is hated.
It's only hated by those who haven't grokked modern php > 7.0. Thanks to laravel the php ecosystem has grown quite a bit over the past few years. I know many rails devs who prefer laravel/php to rails for what it brings to the table. Sure ruby is prettier syntax, but php isn't as horrible as it used to be. Now if it could catch up on parallel/asynch it'd have a better time.
Sure there's sexier languages like elixir and go and rust, but well designed php code is a pleasure to work w/.
I’d argue PHP is so hated because of WordPress and the terrible code/practices associated with its ecosystem.
Amen to that, I live/breathe for laravel projects, I contemplate slitting my wrists when working on wordpress.
Laravel projects can be just as bad of a codebase as WordPress.
yeah, I'm working on one now (picking up where Indian devs left off) ... Code is laravel 5.2, every controller injects session, requests, etc into the constructor, then injects a 'manager' which is basically a loose repository structure, laravel 5.3 > somewhere makes it so using requests/sessions in constructor you generally want to wrap that in middlware...
So upgrading is a huge nightmare. This is one reason I'm not a fan of repository pattern, more classes to inject everywhere even when they're not fully needed. When just making a fatter model would suffice.
Also lots of bad php practices...everywhere else. Bad devs can work on any code base, but laravel core code is pretty beautiful, and laravel's community encourages better code, if some bad actors write shitty code the rest of us have to clean up that's on them, but woocommerce is owned by Automattic and has bad code, you'd think they'd fix it or something being a large company.
There's also tons of great packages out there that are written way more OO and with testing and best practices than there are for wordpress. Laravel is also easier to optimize, and the data structure for wordpress can get out of hand as well.
ltdr; Yes, lots of bad laravel code -- but that's on the individual dev, core laravel and lots of laravel packages use php best practices and encourage good coding. Easier to write better code in laravel than it is a wordpress plugin.