← Back to context

Comment by thinkingtoilet

6 days ago

Out of curiosity, what do you dislike so much about Laravel?

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible

I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have been a large net-positive to PHP as a whole.

I still prefer Symfony:

1) explicit 2) DataMapper ORM by default 3) What I am used to

  • What do you think of Slim Framework as far as best practices for modern PHP in a micro framework (which is similar to OP's Dumbo)? Are there any other micro frameworks you recommend?

    https://www.slimframework.com/

    • At the risk of being piled on by fans of Slim (see fans of Laravel), I don't use slim frameworks.

      For large projects when you get down to it, slim frameworks are simply frameworks where you have to add in components yourself, vs shipping with sane defaults.

      Symfony comes with Doctrine, Twig, etc, but you can choose not to use them or even include them.

      With slim frameworks if they are built correctly they will have hooks to add these components but you have to choose them and import them and set them up.

      I have not worked on a small project in years, and have not bothered looking at slim frameworks in as much time, so my knowledge might be out of date ... but a quick glance through Slim's documentation tells me I'm still fairly close.

      1 reply →

  • Symfony has a huge lot of magic (text/non-typed config files, factory/abstract bloats, ...), and even dark magic (compilation passes, ...), but it's better than Laravel in many ways indeed.

    A simpler framework with modern techniques would be great though.

  • We are in agreement about Laravel's ORM, but I disagree about the magic. Laravel's "magic" is just convention over configuration, and most things can be configured as well.

    • But really, who thought mixins was a good idea? It's the only place in the wild I've seen somebody bind $this when calling closures.

  • Makes sense. I agree on the ORM. I actively don't use Eloquent when I use Laravel. It's fine for simple actions but I find it can get in the way as the project grows more complex. Thanks for sharing.

  • Too much angst about non standards and preferences. Everyone codes the way they feel comfortable and decides what to implement because the more mumbojumbo pattern magic included the more complexity you introduce to your codebase. And the development time skyrockets.

    Just because someone wrote a book about patterns, it doesn't mean it's the high standard and the holy bible by any means. These people are mostly control freaks, who like to exert control on people and think their excrement is akin to a lump of gold.

    And then there are the preachers - like you - who disseminate the bullshit these pattern monkeys rant day and night.