php[architect] logo

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

Editor Bytes – May 2021

Get a look into the May 2021 issue, Testing Assumptions, with Editor-in-Chief Oscar Merida.

Listen

Transcript

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.

Now and again, you get a project that lets you start from almost a clean slate. Or, at the very least, you should examine how you tackle a particular problem. Tried-and-true solutions are valuable and will save you time and effort, at least in the short term, if all you’re focused on is shipping code. But, on the other hand, if you never take the time to refine, improve, or evaluate new options, you’ll stagnate. As a result, you may be missing a configuration update, a new library, or a different deployment process that offers an order-of-magnitude improvement in quality, productivity, or satisfaction.

Of course, this advice also applies at the code level. If you’re still coding as you did in PHP 5, the interpreter is relatively forgiving. Except for a relatively few adjustments, the PHP parser can accommodate you. However, you’re missing out on a ton of syntactical improvements that make code more readable. There’s short array syntax, the null coalescing operator, the match statement, and many more. A few days ago, this point was driven home in the phparch discord when a reader vented that their lead developer was pushing back on using type hints in their codebase. This is a language feature that has been available for years, clarifies the intent of code, and can prevent errors. Don’t resist change because it’s new and requires some time to train up your colleagues and iron out any bumps in the road.

Any change, even a change for the better, is always accompanied by drawbacks and discomforts.

— Arnold Bennett

In our first feature, Anton Titov travels On the Road to Long Living PHP and explains how a long-running execution model unleashed PHP application performance. It also allowed them to use it in more workloads. Next, Jonathan Van Belle invites you to Let’s Discover Atoum. This project, to which he contributes, is a unit testing framework designed to be intuitive and quick. I contributed a piece on Streamlining Behat. I share how I updated my feature testing setup, refined how I write tests, and discovered hidden gems for building browser tests.

Eric Mann talks to Sara Golemon to get the inside scoop about last month’s malicious Git commits on Internals in Security Corner: Radical Transparency. Over in The Workshop: New OS, Old PHP, Joe Ferguson shows how you can use Docker containers to run older PHP versions. This is a valuable stopgap measure while you plan on modernizing or decommissioning an older codebase. In PHP Puzzles, we look at ciphers available in PHP, what they’re used for, and pose a challenge to implement one used by the ancient Greeks. Chris Tankersley continues his API series with How to Build a REST API, in Education Station. He shows how to put one together using existing packages to focus on business code, not on handling HTTP requests. Eric Van Johnson has an Interview with Ryan Weaver in Community Corner. They chat about how Ryan got involved and contributes to the Symfony project. Then, read Sustainable PHP: Wizard Thinking by Edward Barnard to see why you should learn to think like the CRAY programming wizards of yore. To close out the issue, Beth Tucker Long writes about having Awkward Conversations in finally{}. What chats have you been avoiding? How does that impact the project so many of us rely on?

Air date May 25, 2021
Hosted by Oscar Merida
Guest(s)

Leave a comment

Use the form below to leave a comment: