php[architect] logo

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

Master of Puppets

September 2019

Keeping a web application humming and growing is no easy feat. The variety of problems you must be familiar with seems only to keep growing. Automating some tasks can help you cope with an expanding workload. Read this issue to learn how to control your browser with Puphpeteer, automate your load testing, and more.

End-to-End Testing Automation With PuPHPeteer

By Gabriel Zerbib

In general, we perceive the frontend part of a user-facing application as difficult to test in an automated way, and we often relegate these checks to a manual task. In this article, we examine how to use the Puppeteer tool and its PHP bridge, PuPHPeteer, to ensure deterministic validation of the browser side of a web application.

Load Testing Your App with K6

By Ian Littman

You have unit and integration tests to ensure your application operates as intended and you don’t have to test in production. What happens (or fails to happen) when a large number of users wants to take advantage of your application’s functionality all at once? That’s where application performance testing comes in. Here, I’ll provide you with a list of things to think about (and watch out for) when simulating traffic to your site in a test environment, and pointers on using LoadImpact’s open-source K6 tool to do the job.

Reformat, Refactor, Replace

By Samuel Levy

When your everyday grind is a monolithic, legacy, PHP application from the early 2000s, it can be hard to utilize the newer tools and technologies that are becoming available. Fortunately, there’s a process you can follow to get your application up to date without losing business or logic.

Education Station: Visual Studio Code for PHP Developers

By Chris Tankersley

Developers are a fickle, passionate bunch. We love to wage arguments over which is the best editor (obviously it’s VIM), what is the best operating system to develop on (Linux), what is the best language (gola…I mean PHP) to use, and even what editor we should be using (we will discuss this in a second). Thankfully we have a plethora of options to chose from, and we can find what works the best for us. This month, let’s talk about Integrated Development Environments or IDEs.

The Workshop: Real World PDF Generation

By Joe Ferguson

Last month we covered the basics of PDF generation by focusing on the FPDF library. We generated a custom PDF by placing cells on the page and adding data to those cells. FPDF is a relatively low-level library in comparison to modern libraries which may do more heavy lifting for you. This month, we’re exploring methods to take your existing views and use a browser engine to turn HTML and CSS into a PDF.

Pragmatic PHP: Studying Singletons

By Edward Barnard

Practice makes perfect, except when writing PHP code! Our new column Pragmatic PHP explains patterns and variations I’ve used over the years. The better we understand a pattern, the better we can successfully solve the problem before us. This month we’ll take a deep dive into the Singleton Design Pattern. Even though it’s generally considered an anti-pattern, we’ll see useful variations I use time and again. Can global state, static methods, and properties be unit tested? Certainly. We’ll see how.

Security Corner: Twist and Shout

By Eric Mann

Most self-taught developers in our industry learn to leverage an API long before they spend time learning lower-level coding patterns. This experience isn’t necessarily a bad thing. All the same, it’s important to take some time to dig deeper and better understand the tools and technologies at the core of our trade. Computers are deterministic by nature, so we need to leverage purpose-built random number generators to introduce unpredictability into the system.

Community Corner: On Diversity in Conference Speakers

By Karl Hughes

Our systems truly evolve and change for the better when folks privileged by oppressive systems, who might reap some benefits from a destructive status quo, decide they would prefer a better, richer, more inclusive community, and take some of that labor on themselves.

Recently, members of our shared PHP community chose to do just that. Here, Karl Hughes reflects on that choice, how he and others came to make that decision in this specific situation, and why.

finally{}: The State of PHP User Groups

I was researching user groups on various websites such as php.ug and friendsofphp.org, as well as Meetup for work. As I did, I saw three trends forming which I’m sharing here.

Leave a comment

Use the form below to leave a comment: