TLDR: I don't give a shit about whether I upset or offend anyone, this is my opinion from my experience of people in the PHP community, and I can be an antagonistic c**t.

I'm fed up with seeing the amount of bullshit peddled by people in the PHP community with a 'look at me' mentality. The latest of this bullshit in my own opinion is Immutability.

Oh ffs Php, I've been doing this shit for years. Why do we need a third party packages to show we can do immutability? It's like a child proudly bringing you a drawing that they laboured over. That would be great if this were children, but it's not; It's veterans of PHP. Grow up.

Here...

<?php declare(strict_types=1);

namespace Jorpo\Bullshit;

abstract class ValueObject
{
    final public function __get(string $property)
    {
        return @$this->{$property} ?? null;
    }

    final public function __set(string $property, $value)
    {
        throw new BadMethodCallException;
    }
}


class MyValueObject extends ValueObject
{
    protected $mushroom;
    protected $badger;

    public function __construct(string $mushroom, string $badger)
    {
        $this->mushroom = $mushroom;
        $this->badger = $badger;
    }
}

It's that simple.

When I was a new programmer, I used to write packages all the time, I thought it would get me hired if I showed that I knew my shit, but I got told once in an interview

"It makes you look needy and pathetic, learn to talk about the concepts and theory and you'll do much better."

Might be harsh, but I took that with me and it has never done me anything but good.

It's the general trend of reinventing the wheel in PHP and pretending you discovered something new that I don't like. Yes I get that PHP is still pretty new to OOP and people have to learn, but fuck, go read a book or something! People have been doing this shit for decades in other languages. Don't take credit for discovering something that was discovered decades ago.

Please. Stop writing bullshit packages and interfaces like the PHP fucking FIG (oh god don't get me started on that whole heap of bullshit) and go teach someone how to solve those problems themselves. You're not going to be better by trying to look better than everyone else.


I get that everyone wants to leave a legacy, like "I wrote all these packages that people use" but a better legacy would be to learn your craft properly by reading programming books from decades ago and then teaching others about it.

But how do you expect us to teach people without examples you moron!?

Good question. Teach them to think. Teach them to solve the problem themselves. Use TDD. Run classes, do exercises, spend time with other people, interact, communicate. Write blog posts about it; that you learned something. Just don't bother with the packages, it's annoying. There are too many of them already (another thing I find really irritting with the PHP community, and Java to some degree too).

One key thing I learned is: I don't need a third party package if the problem is solvable in less than 30 lines of code.

I ain't gonna use your bullshit.