Making 1Password understand where your change password page is located original
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.
Posts tagged with best practices
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]
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.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
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]
Most developers have probably seen some complex conditionals in legacy code. In this video I show you how to refactor those.
An excellent post on the subject by Sarah Dayan.
Read more [frontstuff.io]
You can make your code more readable by moving all your exception messages to dedicated classes. We using this technique in all our projects and packages.
Out of the box, Laravel comes with the ability to generate "signed" URLs. These URLs have a hash in their query string that verifies that the URL was not modified.
At Flare, we use these signed URLs to add action links in mail notifications. The action links allow users to snooze and resolve errors right from the mail without having to be logged in. Pretty convenient!
My buddy Dries Vints noticed a slight drawback. He got a mail from Flare that contains these action links. A few hours after the mail arrived, he clicked one of the action links. This is what he saw.