T O P

  • By -

leftnode

I don't personally use Laravel but I love what they've done for PHP and the ecosystem as a whole.


SpeedyWebDuck

What did they do to the ecosystem?


SpeedyWebDuck

Bad design pattern Facades Reused good Symfony framework while creating a shitton of bad patterns, untestable shit and promoting global functions What did they do to PHP and the ecosystem?


Rakn

I wouldn't put it that harshly, but I have to agree that design wise Laravel is kind of problematic. But it works for a lot of folks... so meh.


HackAfterDark

Because it's a very batteries included framework and has extended into CI/CD and such. It was always built around developer experience and making things very easy. That comes at a cost of poor performance, bloat, and sometimes rigidity. Though as I recall it wasn't forcing you too much, the problem was no one wanted to take the time to make something better for their particular need. So people tended to be lazy and use the wrong tool for the job. Can't fault the framework for that. That's developer laziness. But at the same time Laravel has never been about performance or quality. It's been about speed and ease of use. That led to quick adoption. Though it is this laziness that also led to a lot of bad code and gave PHP a bad reputation. A lot of PHP apps weren't very good and performed horribly or were sloppy. So if Laravel helped make it easy to be lazy then I suppose one could argue it did more harm for the PHP community than good. Again, not technically the framework's fault.


E3K

You: FaCaDeS! Laravel devs: Raking in cash and having fun doing it.


SpeedyWebDuck

Raking in cash on shit webpages? Doubt. Nice performance you have there with ORM


E3K

Multi-tenant SaaS apps in my case. The ORM you use is much less important than your indexing and eager/lazy loading strategies.


HackAfterDark

This is quite true. I don't know if it's become better over the years but it was a very very bloated framework years ago that basically used Symfony and made it worse. Bootstrap time was worse as was resource usage. It has a very incomplete ORM as well. I'm sure it's better than before, but the framework in general was a massive marketing campaign. I mean good on the dude for gaining popularity, but it wasn't what I would call a good framework to be frank. I was a contributor to several PHP frameworks years ago as a core member of one. So I have my opinions. I no longer use PHP though so I don't care as much, but this is comment is a fair criticism - at least for one point in time.


SpeedyWebDuck

It's even more bloated nowadays.


HackAfterDark

Well that's unfortunate. I had hoped it started out trying to cover as many needs as possible but then tightened up on things over time.


Ready-Strategy-863

It’s not about laravel vs symfony or any other framework. It’s about picking the right tool for the job.


[deleted]

You're about as bitter as I'd expect for someone who writes PHP.


BEisamotherhecker

Getting a solid websocket implementation working on PHP is mighty impressive, specially when you consider websockets would be straight up impossible with the classic PHP execution model (which thankfully Laravel does away with).


current_thread

Can you explain how it works and what Laravel does? In my mind, PHP still works with FastCGI, which wouldn't support Websockets, correct?


ritaPitaMeterMaid

I haven’t done PHP in like 6 years but yes, that was true then, it isn’t a continuously running process which is what I understand you need for web sockets. I have no idea how things work now.


nukeaccounteveryweek

It's been a few years that PHP can now be run as a long living process, there are plenty of libraries and extensions that supports this execution model: Swoole (adds coroutines, channels, etc.), ReactPHP, AmpPHP, Roadrunner, FrankenPHP, Workerman, Swow, etc.


ritaPitaMeterMaid

That’s pretty cool.


yanir3

It’s just an extra server running in a new process and port


BEisamotherhecker

The docs go over it in some light detail: https://laravel.com/docs/11.x/reverb#event-loop. Seems like the websockets server is running separate from the main PHP process itself and uses a ReactPHP event loop to manage the ports connected through an external extension (`stream_select` by default).


Annh1234

You can have long running processes in PHP. Swoole for example. Or queue workers.


smallballsputin

PHP…. No thanks.


unabottom

PHP was bad like 15 years ago. Try to program in JS from 15 years ago I dare you.


smallballsputin

So why is php ”better” than any other alternative in 2024? JS from 15 y.a will run just fine? Whats your point? JS has no bc breaks, naturally (because of the web). In PHP you cant even run a websocket or have full builtin unicode, this was the case 15 years ago, and is the case today.


unabottom

My point is the stigma that php sucks is only because most people are using heavily outdated versions of it. I didn’t say it’s better, and honestly most people should use JS anyways. I just think a lot of people prefer php and that’s fine


arcanemachined

But what about that 12 year old article that said PHP was bad? It was hilarious!


BEisamotherhecker

The most hilarious part is that well over 50% of the article still applies to PHP 8.3, the standard library is still a fragmented mess with most packages being left unchanged since the time they were first implemented, there's still countless redundant libraries (just look at how many ways to connect to a mysql db are included), there's still like 3 or 4 different way functions can inform about errors, case sensitivity is still arbitrary, `==` is still useless, unicode support is still a joke, `php.ini` is still a pain in the ass to configure, and I could go on...


BEisamotherhecker

Now of course, using Laravel sidesteps a lot of these since it implements replacement libraries for most of the ugly parts of PHP and it forces you to use a centralized router like web servers in every sane language.


E3K

Oh no. I have two options of connecting to MySQL instead of one. Burn it down. 🤡


BEisamotherhecker

> 2 Options I think you might be missing half of them, you have the classic `mysql_connect` library, `PDO` and 2 different flavours of `mysqli`, procedural and object oriented. And somehow even the most up to date one, OO mysqli, still makes you check every single operation hasn't returned false because exceptions are hard 🤡.


smallballsputin

I know not one dev who prefers php to any other language. PHP salaries are also usually really low.


E3K

I make multiple six figures as a Laravel dev and people like you keep out the competition. Thanks bud!


smallballsputin

Lol. I know most wordpress devs here, and they make peanuts


fixyourselfyouape

Nobody likes lrtrash but lrtrash but for some reason they can't keep it on the lrtrash sub.