As a full-stack developer with a particular love for the back end, I have always been intrigued by PHP. It always looked so ugly and hard to comprehend, yet it is the underlying tool for enormous institutions like WordPress and Wikipedia. Even if it is old, and a little obtuse looking, there must be something about it right?
A particular challenge I encountered with this project was the inavailability of good resources to help learn the language. So I started to study the fundamentals using the documentation. When I was comfortable with the structure and syntax, I wanted to put it into practice with a project.
For a while, I had been thinking about an idea for a new Twitter bot designed to support and promote one of my favourite footballers, and this appeared to be an appropriate challenge to test out my new PHP skills.
It was definitely a good stretch of my skills, and I learned a lot more about the language than just studying could reveal. Some of my key lessons were around the use of Composer to access public modules; reading and writing to other files from within a script; and handling of environment variables.
I also chose this time to use GitHub Actions to automate the bot's behavior, and as part of the process became a lot more comfortable with writing YAML workflows, using them to trigger on push and on a regular schedule.
- WebsiteHomepage
- Source CodeGithub
- StackPHP, Abraham/Twitteroauth, YAML, GitHub Actions