Roadrunner – High-performance PHP application server, load-balancer, and process manager written in Golang

RoadRunner is an open-source (MIT licensed), high-performance PHP application server, load balancer, and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis. RoadRunner includes PSR-7 compatible HTTP server. RoadRunner runs your application in the form of workers. The workers are kept alive in between requests. …

Execute commands over SSH from PHP with spatie/ssh

A new PHP package released by the fine folks at Spatie is spatie/ssh. Leveraging Symfony\Component\Process\Process it allows you to execute commands over SSH from within your PHP code. spatie/ssh is probably the easiest way to perform a quick SSH command. It doesn’t have a lot of features, but that’s ok. It’s intended as something very …

Redux in 30 lines of PHP

To get the full details behind Redux, Sorin Nunca has recreated it using PHP: As I usually try to understand the tools I’m using, the following tries to be a toy implementation of Redux in PHP, in the hopes of gaining a deeper understanding of the concepts behind Redux. Also covers combineReducers. Redux in 30 …

Fire and forget HTTP requests in PHP

Chris White, on creating really fast HTTP requests in PHP, by manually building an HTTP request and sending a payload: Hand-crafting HTTP requests seemed like an unreliable method at first, but after some pretty extensive testing I can vouch for it reliably sending the requests and the remote server receiving them in full. It can …

google/cloud-functions-framework – Google Cloud Functions Framework for PHP

google/cloud-functions-framework is an open source FaaS (Function as a Service) Framework for writing portable PHP functions. An example function looks like this: <?php use Symfony\Component\HttpFoundation\Request; function helloHttp(Request $request) { return "Hello World from PHP HTTP function!" . PHP_EOL; } One can invoke it locally by executing the included router as follows: export FUNCTION_TARGET=helloHttp export FUNCTION_SIGNATURE_TYPE=http …

How to avoid large function signatures by using pending objects

Freek is developing Mailcoach to send out e-mail campaigns. Along with the development of the package he’s recording a video series on how he has created it. In this video he talks about using “pending objects” to make the API more readable. In this video I demonstrate how to you can create a fluent API …

Guzzle: Fake a Response using a `MockHandler`

Now this will come in handy for testing: ⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses. Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation. — Jason McCreary (@gonedark) December …