Earlier today, I published a long-form post on Twilio's blog stepping through, in great detail, how to write a Slim PHP application that uses Twilio's Verify API to authenticate image uploads to an S3 bucket.
It feels like it took the longest time to research, develop, and write it — so much so that I feel I should have had it published weeks ago! In fairness, however, to write the post, one worthy of publishing, worthy of sharing with the wider community — with you — there was so much to figure out, to plan, to test, and to validate.
That said, during the process, I kept reminding myself of the old saying Rome Wasn't Built in a Day (which, just out of interest, is an English translation of the medieval French phrase: Rome ne fu[t] pas faite toute en un jour.
So, it was extremely heartening to be able to finally publish it today! 🎉 🥳 🎊
In a nutshell, the post does the following:
Shows how the application will work.
Lists the tutorial prerequisites.
Installs the application's dependencies.
Retrieves the required Twilio credentials.
Creates an S3 Bucket along with an applicable AWS IAM user.
Creates the PHP code.
Tests that it works.
I wrote the post for several reasons. Firstly, because I was keen to learn a bit more about integrating PHP apps with S3. Secondly, because there is so much talk about doing so, but not necessarily with a security focus in mind. So I wanted to contribute to the discussion, but to gently reinforce the necessity of having a security-first mindset.
If this sounds like a post that you'd be interested in, have a read and share your thoughts here in the comments.
Why use the Slim framework?
It might seem strange to centre a PHP post around the Slim framework, when PHP has frameworks that have far greater market and mindshare, such as Laravel and Symfony.
However, Slim has been around for what feels like the longest time. It's also very stable, reliable, and uncomplicated.
Unlike Laravel and Symfony, Slim's not backed by a company, so it gets no direct, regular financial backing. Consequently, it depends on the support of contributors and users to evangelise for it.
Given that, I wanted to do my part to help out, plus, at the risk of restating, it's a solid, modern framework that won't get in your way. 🙂
I'm really happy with the result, and the code proves my claims about the framework. I hope that you'll have a read of the post, and step through the code — even if you've never heard about Slim before. If you do one or both, please share your feedback here after doing so.
Till next time,
Matt