PHP
★ A conversation on the future of PHP
Earlier this week the PHP Foundation was announced. In this stream on GitHub, my buddies Christoph Rumpel, James Brooks and I discuss what we think this means for the future of PHP.
Earlier this week the PHP Foundation was announced. In this stream on GitHub, my buddies Christoph Rumpel, James Brooks and I discuss what we think this means for the future of PHP.
The past few weeks, I had a lot of fun coding up the new DNS check of Oh Dear. In this blogpost, you’ll learn why you should monitor your DNS records and how Oh Dear Read more…
[AdSense-A]
For years, my team and I manually updated the changelog for our 250+ packages. Recently, we've improved how we go about this.
In this blog post, I'd like to tell you all about it.
In our packages, a changelog is a simple markdown file where we note all changes to our packages in chronologic order. We do this to make it easy for the users, contributors and ourselves to see when a particular change has been made.
Here's an example changelog from the spatie/ray package. To know more about changelogs in general, head over to the keep a changelog website.
Previously, we manually edited the changelog file whenever we did a new release of a package. As the description, we used the PR titles that were merged in a particular release of It's not a lengthy task, but because of the sheer amount of packages and release our team does, it amounts to quite some time in total.
Recently, GitHub made some changes to the UI when creating a new release. A new button, "Auto-generate release notes", was added. When pressing this button, a text snippet containing all changes is generated. This snippet also mentions all (new) contributors, which is very nice. Finally, a link to a full diff between the new a previous release is added.
Here's how those release notes look like when the release is actually created.
Looks good, right?
Now that we know how to generate release notes automatically, let's look at how we can automatically add these notes to the changelog.md in the repo.
A while ago, Stefan Zweifel released a very cool changelog-updater-action to automatically copy the release notes to changelog.md whenever a new release is tagged. A very cool thing to note is that this action is powered under the hood by a Laravel application.
We're now using this action in most of our repos. Here's the workflow that was added to the spatie/ray repo. It'll run whenever a new release is created.
It will add a commit like this one to update the changelog.
.
Very nice!
Stefan's changelog-updater-action will save my team and me quite some time.
Right now, GitHub's release notes can only be generated from their website. I hope that their CLI will also be updated in the future to also generate these excellent release notes right from the terminal.
.
Also check out Stefan's blog post on his updater action, which mention a few other configuration options.
If you want to know more about creating quality packages and how we at Spatie handle this, check out Laravel Package Training premium video course, which was recently updated for Laravel 8 and PHP 8.
Choosing between Swoole and Roadrunner in a Laravel Octane deployment can be overwhelming – in this post I compare the advantages and disadvantages of both. Read more
An introduction to using bitmasks in general, and their usage in PHP, Laravel, and MySQL. Read more
The PHP Foundation will be a non-profit organization whose mission is to ensure the long life and prosperity of the PHP language by funding part/full-time developers that contribute to the language. Read more
Troy Hunt with a good piece on people asking money in order to disclose a vulnerability. I get a lot of these too. Read more
My colleague Alex finished a very cool sideproject. Using a Raspberry Pi he can now measure how many cups of coffee we drink at the office Read more
Simon give you a tour of the all-new Just-in-Time CDN build we’re working on for Tailwind CSS v3.0, which lets you prototype with every variant, arbitrary values, and more – directly in the browser.
[AdSense-A]
I am excited to share that my team and I have just launched v2.0 of our Laravel Package Training video course.
Here's a the introductory video for the course:
In this course we'll cover:
Building a framework agnostic PHP package. We'll cover basic structure, testing, GitHub Actions, Packagist, and more
Building a Laravel package from scratch. We'll share our proven, modern workflow that we used to create our own 250+ packages
We'll take a look at some real life examples by source diving a couple of our own popular packages
Since recording v1 was released two years ago, I've learned a lot of things on both the package creation process and recording videos. For the v2 update I've re-recorded and improved our entire course.
Packages are now built using our latest insights. We'll use a specialized Package Service Provider as the beating heart of a Laravel package
We now use the latest versions of everything: PHP 8, Laravel 8
Testing via Pest, but we'll also explain how you can use PHPUnit
All videos are now in razor-sharp 4K resolution, 60 fps, and have much better sound quality
To get a taste of what's there, here's a little sample video in which you'll learn how a Package Service Provider works.
I do hope you'll enjoy this course, and I can't wait to see all the cool packages you'll be able to build with this knowledge.