@Crell I like Macs because they are not riddled head to toe with ads (as opposed to Windows), but other than that I am increasingly bitter about the Apple tax. Can literally get 64gb of DDR5 ram if I built my own PC for the price Apple charges for 16gb of ram. Similar issue with storage.
Dear #PHP community! Could someone with power please raise an RFC to make the strict parameter of the in_array() built-in function true by default? It's really annoying to remember putting true as the third parameter every time, and not doing it might potentially lead to weird bugs. Thanks!
@menelion I think the common practice nowadays is to have your own Collection class that wraps data, or if you use Laravel then you already would have a built-in Collection class, which abstracts away all the pain points.
Why does #Symfony define what appears to be a “real” value for APP_SECRET in the .env file that’s committed to your repository, and then, right above it, there’s a comment that says (in all caps):
“DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.”
Where’s the documentation that explains what APP_SECRET is used for? Why doesn't it put this value in .env.local (ignored by .gitignore)?
@tobiaskoengeter@Crell@ramsey My brief experience with Symfony was that Symfony likes defining routes and actions in a YAML file, which means of course I have no editor support and can't just go-to-definition of anything, having to always search for things manually. Horrible user experience.
My first #PHP was 8.0, still in school, and I confess that I began learning it with the prejudice of it being a junky, terrible language everybody was making fun of. Fast forward ~1 year later, after finishing my internship, where I used full stack #Laravel mainly, and having discovered that not only it wasn't that bad, but really a pleasure to work with. Not perfect, but perfectly suitable for its use cases and, what's perfect anyway? So reading this has been a joy. :D https://developerjoy.co/blog/php-doesnt-suck-anymore
@array@hydrian@blu256 Wouldn't call the most used web back-end programming language a corpse tbh. It's just not in the current hype cycle anymore. Those who spend their days chasing the latest trends might care about that, but the rest of us who just want to get stuff done appreciate maturity.
@array@hydrian@blu256 Ah sorry, didn't read too far back to have the right context, so assumed corpse in bad-faith rather than in irony. Text based communication be damned!
But yeah, hating on PHP is like a sub-culture at this point. Everyone's favourite punching bag.
@array@hydrian@blu256 But you know, after being away from PHP for half a decade doing other languages, coming back to PHP I feel I can have so much impact working for medium sized digital agenies, introducing version control, CI/CD pipelines, proper testing and code quality. Day in and day out my existence actually matters.
As opposed to working with the JS tech stack of the week in a modern start-up and watching my life pass by in agile meetings wondering if I will ever matter.
@array@hydrian@blu256 So I guess what I'm saying is, the more people hate on PHP, the more impactful work I have left to take, and I don't mind that one bit.
@array@hydrian@blu256 I think Java is awesome, and a really solid choice for when you want to create something that you can be sure to still run fine 10 years later.
@array@hydrian@blu256 Yeah! The way I run SQL stuff is with my own thin wrapper class over PDO, which instead of a SQL query takes a name of a SQL file, but still passes data through via prepared statements and via sanitization.
@array@hydrian@blu256 Do you assign data to Dto/Model classes (for better editor integration) or just keep it as a HashMap of some kind? In PHP I've been lazy and just keep everything as an array, even though for type support casting to a Model class would be better.
@ralph058@StillIRise1963 This is some weird ass "only white people are racist" type stuff again, isn't it. Which by definition itself is racist towards white people, but that's ok, we've decided.
Modern React.js with Vite is really nice, with out of the box TypeScript support and all, but by far my favourite text stack is most likely #php with #htmx. It's the simplicity that gets me.
@maxalmonte14 Yeah! And HTMx is really powerful with its X-Trigger headers (https://htmx.org/headers/hx-trigger/) that can do events and so forth if you need a little more oomph, and then there's plenty extensions as well to make, for example, dependent things trigger (https://htmx.org/extensions/path-deps/).
I even made a block based WYSIWYG editor entirely with PHP + HTMx just to prove that you can do some very interactive things usually thought to be only possible in SPA's.
@Aedius@janriemer Well no not really, TypeScript can pick up JSDoc comment blocks as well and infer types from those, thus making it so that you don't have to recreate and maintain anything on your part. Besides that, most projects provide TS types themselves, so it's a non-issue in either case.
Whereas in Rust you have to do it yourself 100% of the times and if you're using 10+ libraries then that very quickly becomes unreasonable.