Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I would say that Laravel is an extremely high quality framework

I strongly disagree. My experience with Laravel made me see it as a medium quality framework with many flaws. I'll point out to a few of them.

The source code quality of the framework is not very high, and locally very poor. For instance, you can't autocomplete normally with an IDE unless you load extra declarations of the magic. Sometimes functions return values of varying types. And, last but not least, there are many cases where a call to a method on on object is intercepted by the magic `__call()` and redirected to another object created on the fly.

As pointed above, the abuse of magic means browsing the Laravel API is a nightmare. You won't see methods that you may call. Overall, the official documentation is tutorial-oriented, with an abuse of videos. I have not worked with Laravel for more than 2 years, but at that time I could not find a public reference documentation.

Laravel is extremely slow. Speed or concurrency is not a problem for many web sites, but when your framework is 10-100 times slower than others, you hit performance problems sooner. I suspect the magic and a few design choices (e.g. not using PHP native sessions) mean that a Laravel application can't get fast.



You say

> medium quality framework with many flaws

Yet you only point out

> you can't autocomplete normally with an IDE

> You won't see methods that you may call

Firstly if there are "many flaws" list them because it seems you only don't like the developer experience with the autocomplete. I noticed no problem with browsing the Laravel API [0] with my short adventure with it.

> framework is 10-100 times slower than others

citation needed.

Also you didn't mention what you tried to use it for but remember software engineers are paid to pick the right tool for the job, Laravel is not the top pick for highly-concurrent idempotent microservice on Kubernetes, it's for monolithic app replacing that old WordPress installation without changing the tech stack

[0]: https://laravel.com/api/8.x/index.html


> Laravel is not the top pick for highly-concurrent idempotent microservice on Kubernetes,

Taylor Otwell would like to introduce you to Larvel Octane, i.e. support for swoole/workerman with 6k+ reqs per seq on a basic desktop.

Laravel with swoole basically makes it as performant as elixir/phoenix.


But do you have to rewrite all your code async-style? And what are the implications for using non-async PHP libraries?


Presumably, you pick/choose which would use swoole or be delivered on php-fpm maybe run both with nginx proxying swoole, then your old code would just run sync and newer could run async if required --maybe for things like chat/websockets and not for just static pages.


> framework is 10-100 times slower than others

Seriously?

This is the hill you want to die on?

With swoole (laravel octane) you can up localhost from 200 reqs/sec to 6000+ .. I've tested phoenix and only gotten about 4600.

But just going off "plain laravel"...

According to techempower it STILL beats rails and django.

https://www.techempower.com/benchmarks/#section=data-r20&hw=...

> Overall, the official documentation is tutorial-oriented, with an abuse of videos. I have not worked with Laravel for more than 2 years, but at that time I could not find a public reference documentation

The docs are geared more towards beginner/intermediate users most advanced users go to the API/class docs, and look at the underlying code to get an idea of how things work internally, if you haven't done that then you're definitely not going to know how everything ties together.

Also there's plenty of plugins and an ide_helper package to generate metadata/etc to make it so you get damn good autocompletion in just about any ide and especially phpstorm, but I use vscode and used to use sublime both have great completions...


> with an abuse of videos

Are you thinking Laracasts is the documentation or something? I don't think there is a single video in the Laravel docs.

> I have not worked with Laravel for more than 2 years, but at that time I could not find a public reference documentation

You can't have looked very far, because even now the docs go back to 4.2 (released 2014).


The magic is a problem in other ways as well, it confounds static analysis (Psalm has to have a separate plugin just to be able to profile it).

I'm not saying it's a fault of Laravel (yet) because the framework predates a lot of 7/8 stuff but they show absolutely no incentive towards making it better in that area.

Frankly, just pick symfony it's a better tool for longer lived projects, better documented (insanely better), better backwards compatibility.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: