Code that breathes original
Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.
Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.
– devonmather.dev - submitted by Devon Mather
Let's explore the option of firing events on model scopes to add some glue between our feature tests and our unit tests.
Read more [devonmather.dev]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
Here's why you should be carefull with array_merge in loops.
Read more [www.exakat.io]
Kevlin Henney makes the case for not suffixing class names, or files with the type of object it contains.
Read more [kevlinhenney.medium.com]
Validation takes on many shapes and forms. In this post, Frank walks you through all the possibilities.
Read more [blog.frankdejonge.nl]
Ever found yourself wanting to make a small tweak to a PHP file in a Composer dependency? Here's how to do it without forking the entire package.
Read more [downing.tech]
At Raycast, the dev team only requests code reviews when they think it's necessary.
Read more [www.raycast.com]
A to-the-point summary of all awesome PHP features
Read more [front-line-php.com]
Here are a few best practices for working with a large tables.
Read more [42coders.com]
A few days ago, a new version of 1Password was released that is able to detect where a user can reset his or her password.
– doeken.org - submitted by Doeke Norg
Cloning is a nice way of creating a quick copy of an object. But there are some things you need to be aware of!
Read more [doeken.org]
Matthias Noback shares some considerations on when you could rely on PSR abstractions
Read more [matthiasnoback.nl]
A static analyzer helps you to find bugs in your code without even running it. Popular static analyzers for PHP are Psalm and PHPStan. In this post, we're going to look at what such a static analyzer can find in a two-year-old codebase.
Read more [flareapp.io]
I've been creating web applications for over 15 years now. It's only in the last five years that I've learned how to test an application automatically. I can safely say that there is no other technique that has improved the quality of my code more.
Let's go over what a test is and all the benefits it provides.
Read more [testing-laravel.com]
Native PHP functionality and having a good design in the first place provide everything you need to avoid a mocking library.
Read more [peakd.com]
Using Dinero, you can perform mutations, conversions, comparisons, format them extensively, and overall make money manipulation in your application easier and safer.
The docs also contain a few falsehoods many developers believe to be true about money.
Read more [v2.dinerojs.com]
Anna Filina shares how she goes about organizing small functions.
Read more [afilina.com]
Sarah Dayan throughouhly explains the differences between utility classes and inline styles
Read more [frontstuff.io]
We talk about cleverness as if it’s Just Bad, such as “clever code is harder to debug”. That’s going too far. Cleverness can lead to faster, safer, even clearer code.
Read more [www.hillelwayne.com]
My colleague Brent shares some thoughts on possible improvements to handling config values.
Read more [stitcher.io]