Reviewing One Year At Laravel
Published by James Brooks on July 29, 2020personal laravel
This is crazy to say, but today marks my first anniversary at Laravel! I'd been thinking about all the things that I've worked on and achieved whilst at Laravel, and I thought it'd be fun to look back at them and maybe talk about them a little more.
"Is Forge dead?"
— Everyone on the internet
Let me assure you right now... Forge is anything but dead!
Here are the headline features that we've released over the last year. Some of these features took a good month or two of solid work. Click each header to go to the announcement blog post.
User Isolation allows you to create a new site, which runs its own PHP-FPM process under a separate user. You would typically use this feature when installing a WordPress blog with plugins, or a third-party project that you're not 100% sure you can trust. An isolated website prevents the user from reaching into directories that it does not own and reading or editing files.
This feature required touching almost every moving part of Forge! Everything from deployments to workers had to be updated, so that it was aware of the isolated user.
I had made smaller changes to Forge at this point, but this was my first big feature.
Backups had been an often requested feature and I was glad to see that it was received so well! Did you know that this feature is actually partially open-sourced? Open sourcing this component has two benefits:
- We're able to change the script and have all servers download the new backup runner on each execution.
- We can also receive contributions to make the backup-runner better.
The bulk of this work was handled by Amazon's AWS CLI tool. Because I chose to use the
aws CLI tool, I was also able to extend the feature recently, allowing you to BYOH (Bring Your Own Host) with very little additional effort!
We chose to only support database backups for two reasons:
- Source files are already stored in a source control provider such as; GitHub, GitLab, Bitbucket.
- In an ideal world, user-uploaded files should always be stored somewhere like S3.
This feature was also a big one! It allows you to continuously monitor a server, including its: Disk Space, CPU Load, Free and Used Memory.
Monitoring a server also poses some interesting challenges:
- What happens if a server loses connection?
- What happens if a server runs out of space and you can't store any info?
The monitoring component started life as a Go CLI app, which I loved working on, but we decided to scrap it and write it with PHP (with Laravel, of course) because it didn't make business sense to write an app in a language only one of us really understood. By the way, this is the second open-source component of Forge!
It allows you to monitor the health of a server and is particularly useful for customers who use a Custom VPS, which don't have monitoring built-in like DigitalOcean.
Okay, this one isn't anything special but, behind the scenes, it means that we're now using the Notification feature that Laravel provides us with - straight out of the box! Whilst working on this, I went through the notifications that Forge sends and modernized them. Basically, this means that we're able to add new notification channels much easier than before.
You know the notification features that Laravel provides today? They came from the need to have them in Forge!
This feature stemmed from an idea I had whilst working on Multiple PHP Installations, because each site could be running its own version of PHP, and so the deploy script would need to be updated if this changed. Deploy script environment variables meant that we could use an environment variable (
FORGE_PHP in this case) and then if the version of PHP a site uses ever changed, the deploy script wouldn't need updating.
You can now create complex and dynamic deployment pipelines right within Forge. This is especially useful when combined with Quick Deploy or Deployment Triggers.
The example we used in the announcement prevents commits with the message of "wip" that were not executed manually to not be deployed.
if [[ $FORGE_DEPLOY_MESSAGE =~ "wip" ]]; then if [[ $FORGE_MANUAL_DEPLOY -eq 0 ]]; then echo "WIP commits will not deploy automatically..." exit 1 fi fi
Finally, we launched an often requested feature: the ability to install multiple versions of PHP on a single server.
Just like User Isolation, this change also extended far across the Forge codebase! I had a couple false starts with this feature because I was trying to make a square peg fit a round hole. Once I'd decided to scrap the existing PHP management code, I was able to make a lot of progress and finally ship the feature.
We've released a lot of cool new features in Forge, but we've also fixed many little bugs and added sparkles forged (pun fully intended) with love too:
- SSH key fingerprints
- New modal design
- First-party Hetzner support
- Server and site log viewing
- Cron syntax validation
- Nova backend, allowing us to easier handle support tickets
- New sites dropdown
- New search bar (Vapor inspired!)
- Server tag filtering
Is Nova dead?
— Everyone else on the internet
The internet has a thing about products and death... No, Nova is also not dead, far from it! In fact, since working at Laravel, I have been already been a part of forty two releases.
Nova was my first big assignment at Laravel. I went through over 300 issues, cleaned them up, and got started on fixing bugs and adding new features. I'm not going to go through everything, because there are a lot of things to list, some of which sound quite boring out of context...
- I've updated a lot of documentation
- Speaking of documentation, I made them available offline
- Improved MSSQL support
Selectoptions can be a closure, something I used a lot in my previous job
- Added a new
- I added the ability to control the "Traffic Cop" feature
- And so much more...
Outside of writing code, I've also been on the support channels for Envoyer, Forge and sometimes Nova. This has been a great experience for a few reasons:
- Directly interacting with users of the product allows you to really understand any pain points or frustrations they may be having. This is especially useful when you're working on new features or you've made changes that people don't like.
- Further to the above, sometimes you notice that you're answering the same question multiple times, so you add documentation or you rewrite the documentation to be easier to comprehend or discover.
- I've been able to learn a lot more about the products themselves by handling support. By jumping into the issue myself, I'm afforded the time to learn about why this issue happened, whether it was caused by our product and how to fix it.
- You notice issues that crop up multiple times and start to see patterns.
And there we have it, one year at Laravel! I'm already looking forward to reviewing the next year.