The original post: /r/php by /u/BigLaddyDongLegs on 2024-11-09 09:13:19.
So every once in a while you’ll find some little nugget in a repo, or documentation or articles that make’s you instantly think of all the typing you could have avoided throughout your career.
Nuggets such as when I found out dirname()
takes a second param, which is how many levels you want to go up. So instead of all the times I did ugly dumb shit like this: dirname(dirname(__DIR__))
, I could have just been doing this: dirname(__DIR__, 2)
Anyways, today I realised instead of the most annoyingly verbose composer command composer dumpautoload
or worse composer dump-autoload
…you can just do composer du
!!! I literally held my head in my hands just now when I saw it in the PropelORM docs. I’ve always hated typing out composer dumpautload! It’s like a tongue twister for my fingers for some reason.
Anyways, did everyone know this. Or is this new??? I hope I’m not alone and now you too can be free of composer dumbautoload