Overriding vendor classes
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]
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]
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."
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]
Matthias Noback wrote down some good testing advice.
Read more [matthiasnoback.nl]
Regular expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task. Here are some tips to improve and write better regular expressions in PHP.
Read more [php.watch]
Mohamed shows how you can deal with N+1 problems using the $with model attribute and the newly added Model::preventLazyLoading() method.
Benjamin Eberlei tells the story of a performance mistake that is quickly made even by experienced developers.
Read more [tideways.com]