Welcome to the third issue of my "Round Up" series! At the end of each month, I aim to write a round up of the some of the month's news from the Laravel and web development community.
If you haven't read last month's issue, you can read Round Up: February 2022.
Laravel Origins Documentary
At the beginning of the month, the Laravel Origins documentary was released. It gave a really cool insight into Laravel and how Taylor Otwell and the community grew it to the framework that it is today.
Personally, I really enjoyed watching it because I love learning about the history of successful people, companies and products. So, it was cool to get a brief insight into the motivations behind Laravel being created.
If you haven't already watched it yet, you can check it out here on Youtube:
"Laravel Valet 3" Released
In March, Laravel Valet 3 was released with a cool new website isolation feature. This new feature allows you to isolate the version of PHP that the site is running, rather than setting the PHP version for all of your projects at once.
For myself, this feature has already been a huge help. As a freelancer, I work on quite a few projects at once. So, I work on some projects that running on PHP 8.1, some running and PHP 8.0, and the odd few that are still using PHP 7.4. So, instead of me needing to remember to switch the PHP version in Valet when I work on different projects, I can now isolate the sites to use a specific PHP version.
To get a quick idea of how easy it is to isolate your application's PHP version, let's take a look at a quick example. Let's imagine that we are using PHP 8.1 with Valet but we want to use PHP 8.0 for a specfic site.
We'll start by navigating to the project's directory in our terminal:
And then we'll run the isolate command:
1valet isolate firstname.lastname@example.org
That's it! Your project is now isolated to only use PHP 8.0!
Printing GitHub Issues with a Receipt Printer
During the month, Andrew Schmelyun built a really cool (and I mean, really cool!) side project. Using a receipt printer and a Raspberry Pi Zero W, Andrew created a tool that would print GitHub issues onto receipts each time a new issue was created. To see how it works, take a look at the video in his tweet here:
So here's why I bought a receipt printer:— Andrew Schmelyun (@aschmelyun) March 24, 2022
Every time one of my GitHub repos gets a new issue, I now get a physical ticket printed out on my desk 🪄 pic.twitter.com/g6uYtGP9J7
At the time of writing this article, the tweet has also done really well; with 462 replies, 3,082 retweets, 834 quote tweets, and a whopping 22.7k likes!
If you're interested in learning more about this, Andrew's got a really interesting article on his blog that talks about his motivations behind the project and how he got it all working. I'd definitely recommend checking it out if you have a few minutes to spare.
"Mango Two" Extension Released for Chrome
If you've been reading any of my past Round Ups, you'll know that I've been slowly working on a side project called Mango Two. For any of you that haven't heard about it yet, Mango Two is an open source, privacy-first URL shortener. At the moment, it consists of two parts: an API built in Laravel using my Short URL package, and a Chrome browser extension.
During March, I released a basic landing-page for Mango Two to fill the empty space. You can visit it at https://mangotwo.com. Once I get a better chance to spend more time on the project, I intend to expand the page add a URL shortener to it that you can use for completely free.
"Laravel Config Validator v2.0.0" Released
Towards the end of 2020, I built a small package as a proof-of-concept called Laravel Config Validator. The intention of the package was to define rules for your Laravel app's config so that you could validate the fields.
My main motivation for this package was that I'm regularly being onboarded to new projects as a freelancer. So, each time I pull down a project to my machine to start working on it, I need to make sure that I have all the correct config and environment variables set up. For example, let's say that the app requires API keys for making HTTP requests to an API. By using Laravel Config Validator, I could define a rule to ensure that the keys are set correctly and in the right format. If a developer wanted to get really fancy, they could also write their own custom rule to make an API call so that they can 100% certain that the config values are working with the API.
After using the package in a few of my side projects, I picked up on areas that could be included and bugs that needed to be fixed. For example, because the validation rules were placed in the
config folder in a Laravel app, it prevented the
php artisan config:cache command from working.
So, during March, after getting some spare time in between projects, I spent a bit of time fixing and updating the package to get it ready for using in commercial projects.
If you want to view Laravel Config Validator v2.0.0, you can check out the repo on GitHub at: Laravel Config Validator. If you have any feedback on the project and how it could be improved, I'd love to hear your thoughts!
Open Source Contributions
During March, I didn't really get the chance to spend much time trying to contribute to other people's open-source projects. However, I did manage to make a small PR to Claudio Decker's new package:
If you're interested in checking out the entire changelog for each of the releases, I recommend checking out the release notes for each one on GitHub. Here are the main additions that were added in the releases:
- Add NotificationFake::assertNothingSentTo() (#41232)
- Support --ssl-ca on schema load and dump (#40931)
- Add whereNot() to Query Builder and Eloquent Builder by (#41096)
- Added support for index and position placeholders in array validation messages (#41123)
- Add resource binding (#41233)
- Add ability to push additional pipes onto a pipeline via chain($pipes) (#41256)
- Add option to filter out routes defined in vendor packages in route:list command (#41254)
- Optionally cascade thrown Flysystem exceptions (#41308)
- Support modifying a char column type (#41320)
- Add "Mutex" column to 'schedule:list' command (#41338)
- Allow eloquent whereNot() and orWhereNot() to work on column and value (#41296)
- Allow VerifyCsrfToken's CSRF cookie to be extended (#41342)
- Added soleValue() to query builder (#41368)
- Added lcfirst() to Str and Stringable (#41384)
- Added retryUntil method to queued mailables (#41393)
- Added callback support on implode Collection method. (#41405)
- Added Illuminate/Filesystem/FilesystemAdapter::assertDirectoryEmpty() (#41398)
- Implement email "metadata" for SesTransport (#41422)
- Make assertPath() accepts Closure (#41409)
- Added callable support to operatorForWhere on Collection (#41414, #41424)
- Added partial queue faking (#41425)
- Added --name option to schedule:test command (#41439)
- Define Illuminate/Database/Eloquent/Concerns/HasRelationships::newThroughInstance() (#41444)
- Added Illuminate/Support/Stringable::wrap() (#41455)
- Adds "freezeTime" helper for tests (#41460)
- Allow for callables with beforeSending inIlluminate/Http/Client/PendingRequest.php::runBeforeSendingCallbacks() (#41489)
- Added whenTableHasColumn and whenTableDoesntHaveColumn on Schema Builder (#41517)
- Added Illuminate/Mail/Mailable::hasSubject() (#41575)
- Added Illuminate/Filesystem/Filesystem::hasSameHash() (#41586)
Hopefully, this post should have shown you at least one cool new thing from the Laravel world in March 2022.
If you enjoyed reading this post, I'd love to hear about it. Likewise, if you have any feedback to improve the future ones, I'd also love to hear that too.
If you're interested in getting updated each time I publish a new post, feel free to sign up for my newsletter below.
Keep on building awesome stuff! 🚀