In the past ten years, PHP has undergone several transformations that made the language faster, stricter, and included support for a large variety of high-quality tooling. But, most importantly, the PHP community continued to mature as well, which led to the introduction of modern development practices, robust application architectures, and top-notch instruments.
In the PHP world, if you ask most developers about testing frameworks, the first response you’ll get is PHPUnit. But there are several alternatives, and one of them is atoum. This article introduces you to atoum, the simple, modern, and intuitive unit testing framework! You will discover how to write fluent tests and execute them in parallel for speed.
Behat, and feature tests overall, are crucial for giving you confidence that when you refactor code, you don’t change how an application works and for helping you understand how an application behaves in practice. Investing in integration and functional tests is worth it in the long term, and in this article, we’ll see how I also updated my Behat setup to run browser tests in Chrome.
Ciphers come in many different forms and have been used since ancient times to encode and decode vital messages. Today, we use complicated mathematics to encrypt and decrypt messages. Typically, we depend on shared and secret keys to ensure the message is only readable by the intended recipients. What if you don’t have the computing power of a modern device at your disposal? This month, let’s look at using Polybius Squares to share secret messages.
Over the last few months, I have been slowly building toward something. As you have come along this text journey with me—which thankfully has no Grues—I have been putting into place all the knowledge that you need to start building a web API, and most importantly, to understand what that code will be doing. We learned how HTTP itself works, the history of APIs, what requests and responses do, and how to design an API.
This month, we’re indulging in a bit of magic and a bit of weirdness. That’s my way of explaining what I call Wizard Thinking, something I’ve found to be an instrumental skill indeed.
Last month, news broke of a breach of the PHP community’s development Git server. This breach included the addition of two malicious commits to the language’s source code. The malicious code was immediately identified and removed; the team is taking further steps to ensure this kind of situation never occurs again.
Fun fact, no matter where you stand in the state of Michigan, you are never further than 85 miles from a Great Lake. It’s the only state that touches four of the five Great Lakes, has its own regional dialect, which includes phrases like “a Michigan left” and “Bumpy Cake,” and happens to be the birthplace of this month’s Community Corner spotlight Symfony core member Ryan Weaver.
When we talk about long-term planning for our code, we often mean making sure that it can handle increases in traffic as usage increases (if we are lucky). We also usually mean making sure the code is flexible enough to handle the new technology and client requests inevitably coming its way. These are great things to plan for, but we leave ourselves open to a lot of risk when this is all we plan for.
We continue our containerization journey from last month where we covered how to refactor an application that created PDF files to use S3 to store the documents instead of relying on the local server’s storage. Another challenge often found is when an application uses outdated PHP and runs on an unsupported/outdated operating system version. What happens if you find yourself in the scenario where your current operating system is reaching the end of life (EOL) while the new LTS doesn’t support your current PHP version? What happens if you weren’t able to keep up with PHP’s release cadence? The good news, we can use containers to bundle our application with our old PHP version, which we can run on newer operating system versions.
Leave a comment
Use the form below to leave a comment: