Migrating to PHPUnit 9
Sebastian Bergmann, creator of PHPUnit, walks us through some history and design decisions for PHPUnit.
Read more [thephp.cc]
Sebastian Bergmann, creator of PHPUnit, walks us through some history and design decisions for PHPUnit.
Read more [thephp.cc]
Our spatie/laravel-event-sourcing package is probably the best starting point for event sourcing in Laravel. It has excellent docs, that explain event sourcing from scratch, support for aggregates, projectors, and much more! It's all beautifully integrated in Laravel.
Recently we released v3 of the package. In this blogpost I'd like to walk you through the changes.
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.
"Freek publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
Our team released a new package called spatie/ssh. This package allows you to execute commands via an SSH connection.
Last week, my colleague Ruben and I released a package called spatie/docker, that makes it easy to spin up docker containers and execute commands on them. In this blog post, I'd like to introduce what you can do with it and why we built this.
– stitcher.io - submitted by Brent
Brent explains a few patterns to add enum functionality in PHP.
Read more [stitcher.io]
Joe Watkins compares the execution speed of PHP 4 against PHP 8. It's amazing how far PHP has come.
Read more [blog.krakjoe.ninja]
Last week our team launched Mailcoach, a self-hosted solution to send out email campaigns and newsletters. Rather than being the end, laughing something is the beginning of a journey. Users start encountering bugs and ask for features that weren't considered before.
One of those features requests we got, is the ability the set the guard to be used when checking if somebody is allowed to access the Mailcoach UI.
In this blog post, I'd like to show you how we implemented and tested this.
Today, our team released Mailcoach, a beautiful, self-hosted mailing list manager. It integrates with services like Amazon SES, Mailgun, or Sendgrid to send out mailings affordably. It’s packaged as a stand-alone app, or can be integrated into a Laravel project, it's perfect for bloggers, artisans, and entrepreneurs.
Even if you're not in the market for an email solution, Mailcoach includes a video course on how it’s built. I'm sure you'll see some valuable techniques that you can bring to your own project.
In this blogpost, I'd like to share why and how we've built this.
– liamhammett.com - submitted by Liam Hammett
Some tips when dealing with lots of macros in Laravel, and composing them into mixin classes elegantly.
Read more [liamhammett.com]
Did you know that the null coalescing assignment operator in #PHP 7.4 can be used to make memoizing stuff a little more clean? pic.twitter.com/SWWJEXQBLx
— Brent (@brendt_gd) January 16, 2020
Read more [twitter.com]
My colleague Brent explains everything that's coming in PHP 8. Union types alone will make it a worthwile release.
Read more [stitcher.io]
– cwhite.me - submitted by Chris White
Disabling client-side browser validation will allow you to test your real validation rules, instead of Chrome's.
Read more [cwhite.me]
🕵️♂️ Just discovered "->optional()" in $faker for my Laravel factories.
— Caleb Porzio (@calebporzio) January 18, 2020
Check it out.
Did you already know about this? pic.twitter.com/MrVETY7i3f
Read more [twitter.com]
For many years we've relied on Travis to run the tests of our packages. For projects we used Circle CI. Recently we moved this responsibility from Travis and Circle CI to GitHub actions. In this blogpost I'd like to explain why and how we did this.
Jonathan Reinink wrote another excellent blog post.
As much as possible, keep data fetching to the perimeter of your Laravel applications. What do I mean by this? In the simplest terms, it means running your database queries in your controllers.
Read more [reinink.ca]
TIL: in @laravelphp blade you can pass data up the main layout you are extending #laravel #php pic.twitter.com/IEWYHv0uyE
— Sidrit Trandafili (@strandafili) 23 december 2019
Read more [twitter.com]
⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses.
— Jason McCreary (@gonedark) 23 december 2019
Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation. pic.twitter.com/Ui2Zyqj2Lt
Read more [twitter.com]
In this video I demonstrate how to you can create a fluent API by using pending objects. We'll take a look at how subscribers can be created in Mailcoach. As a bonus I explain how jobs are dispatched using a pending object in Laravel.
TIL that there's a shorthand for the dreaded pluck('id')->toArray() combo in #Laravel:$user->posts->modelKeys() will return all related post IDs that are attached to the user model! 🔥https://t.co/imIPlVNjwi
— Alex (@AlexVanderbist) 19 november 2019
S/O to @rubenvanassche for telling me this existed 👌 pic.twitter.com/c3sANn52M8
Read more [twitter.com]
Brent explains what view models are and how you can use them. We use view models in almost every project at Spatie.
In essence, view models are simple classes that take some data, and transform it into something usable for the view. In this chapter I'll show you the basic principles of the pattern, we'll take a look at how they integrate in Laravel projects, and finally I'll show you how we use the pattern in one of our projects.
Read more [stitcher.io]