php[architect] logo

Want to check out an issue? Sign up to receive a special offer.

Testing Assumptions

May 2021

It’s worth periodically re-evaluating how you work to build, design, and maintain web applications. In this issue, we look at a new way to run PHP, a different unit testing framework, cultivating wizard thinking, and having awkward conversations about your work, project, and PHP core.

On the Road to Long Living PHP

By Anton Titov

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.

Let’s Discover Atoum

By Jonathan Van Belle

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.

Streamlining Behat

By Oscar Merida

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.

PHP Puzzles: Sending and Receiving Polybius Ciphers

By Oscar Merida

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.

Education Station: How to Build a REST API

By Chris Tankersley

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.

Sustainable PHP: Wizard Thinking

By Edward Barnard

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.

Security Corner: Radical Transparency

By Eric Mann

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.

Community Corner: Interview with Ryan Weaver

By Eric Van Johnson

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.

finally{}: Awkward Conversations

By Beth Tucker Long

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.

The Workshop: New OS, Old PHP

By Joe Ferguson

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: