Understanding PHP 8's JIT
PHP 8’s Just In Time compiler is implemented as part of the Opcache extension and aims to compile some Opcodes into CPU instructions in runtime. Nickolas Da Silva explains how it works.
Read more [thephp.website]
Posts tagged with php
PHP 8’s Just In Time compiler is implemented as part of the Opcache extension and aims to compile some Opcodes into CPU instructions in runtime. Nickolas Da Silva explains how it works.
Read more [thephp.website]
Leonel Elimpe explains how you can use our DTO package.
Read more [github.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.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
Atymic explains a cool new feature in Laravel 7
Read more [atymic.dev]
In this video, which is part of the mailcoach video course, I show how I like to write my exceptions.
At the time of writing this post, we're running a contest where you can win a free mailcoach license.
Have you every come across confusing if statements with complex conditionals such as this? I bet you did!
// please kill me 🤯 if (!(($this->shipping_country == "GB" || (strcmp($this-status, "Valid") !== 0)) {
To me, this is completely unreadable.
In the video below I show how I deal with this situation. Spoiler: add some tests around it and break the conditionals apart.
This video is part of the Mailcoach video course. It contains many more videos on how to write clear code. You can use this coupon code to get a nice discount of $10.
YES-I-WANT-TO-WRITE-READABLE-CODE
laravel-tail is one of my favourite packages. When installed in a Laravel app it can be used to tail the log file. To tail a log file locally, you just have to issue this command: php artisan tail and it'll start tailing the latest log file (so it works for both daily and single log files). Any line…
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.
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.