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

Also not OP, but the linked reddit post sums up one of the major reasons I had to get out of PHP several years ago. Everything is/was moving to Laravel in PHP land. I got tired of dealing with highly coupled, non-unit testable code that seemed to go out of it's way to ignore SOLID principles.

God help us if it this project becomes the normal way of writing http go servers applications. Maybe at that point it's time to become an embedded rust programmer or a monk.



People like you, not meant personally, are the reason I abandoned PHP. Too much dogma. Too much nonsensical paradigms without considering pragma.

Who gives a shit about SOLID or OO.

I used to love PHP for its simplicity. That was before zealots of your type flooded the ecosystem.

You wanted to apply what they taught you in uni, which was Java, to PHP. PHP was fine before. I earned good money with it and had fun doing so. Then 2010 the next generation of clueless devs enters the scene, polluting it with their nonsense.

Very much what's happening in Go right now with the cloud microservices fetish.

Can't you booksmart idiots STFU for once and let people do the pragmatic and sensible approach?

Fucking Hipsters


> Who gives a shit about SOLID or OO.

The people who care about and are tasked with maintaining a large long running code base.

> You wanted to apply what they taught you in uni, which was Java, to PHP.

Nope, that came after my time.

> Can't you booksmart idiots STFU for once and let people do the pragmatic and sensible approach? I earned good money with it and had fun doing so. Then 2010 the next generation of clueless devs enters the scene, polluting it with their nonsense.

Those OO & OOP principles are the pragmatic and sensible approach learned after cleaning up after "hipster" web "artisans". If we're going to throw around claims without knowing anything about the other person; you sound like the kind of dev who writes some code that works on the happy path, but is completely unmaintainable and non-extensible.

(But I know nothing about you, so I really have NFI, just like you have NFI about me and what I do)


When I studied computer science, I promised myself to never touch PHP again.

But PHP has more to give than just as a birthing ground for teenage programmers.

When I many years later accepted a PHP job as a senior developer, PHP provided a consistent experience of "bad practice everywhere", a fractal of cringe I couldn't ironically reproduce. Working with this for a year taught me a lot about how to deal with critical legacy software beyond repair and being responsible with what you've got.

I think there is no better way to get your hands consistently dirty than with PHP.

Coincidence: I do embedded Rust, and my wife is a buddhist monk. ;-)


Many of my programming jobs in PHP had me working with people that were super anal about "good coding practices". Especially the Symfony guys seem to try to be the new ultra-corporate Java. So I don't think it a issue with the language but more that you didn't find your people. (Personally, I actual like working with legacy crap. It's easy money and reminds me of the past when things were simpler.)

I feel most of the PHP community is pretty mature these days. More pragmatic than Rust, sure but that is a good point in my book. Though I am glad you found your enlightenment.


Symfony was the worst. Holy shit dude. I still have to deal with a legacy Symfony project, which needs to be rewritten because of their... I don't even know what to call it.

That stof guy was one of the worst. Inconsistencies, incompatibility. But the dogma was strong.

Indeed they wanted to be the Java of PHP. And so inefficient. Imagine duplicating all variables of a request context for dogmas sake. So you can later do Request->getVar() from their own copy. It shows a basic not understanding of the language.


> I don't think it a issue with the language but more that you didn't find your people

I can be more specific: I'm identifying problems with the language ecosystem.

I deliberately didn't shit on the people involved; I'll definitely ride the #not-all-php-programmers (I've met some great ones), but it takes a broken mind to accept a toolchain this historically fallible as something with which you'd want to recreate the Java ecosystem. ;-)

Have you tried Java?

It's definitely a better Java than PHP!


"bad practise everywhere" - you could say that for C++, Python and many more programming languages, too. If we're honest - most of the code out there is poorly written. PHP - nowadays - doesn't prevent developers in following good practises.


What would you like to do with PHP/Laravel that isn't unit testable? Laravel is, from my experience, written in a way that specifically makes testing of most things very easy.


Yeah, I'd like to know, too. I've done laravel + TDD for almost a decade and I can't think of anything you can't test or mock. Emails, Queues, Guzzle requests, AWS SDK, events, grammers, sessions, etc.. You name it, I've probably done extreme TDD to it.


It seems like they thought a lot about making sure everything could be mocked and tested: https://www.goravel.dev/digging-deeper/mock.html




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

Search: