Convert between Symfony HttpFoundation Request / Response and Swoole Request / Response classes with swoole-http-message-bridge

Today I was implementing an HTTP Server using Swoole. At its core, the code looks just like the Swoole HTTP Server example: <?php $http = new \Swoole\HTTP\Server("127.0.0.1", 9501); $http->on('request', function (\Swoole\HTTP\Request $request, \Swoole\HTTP\Response $response) { // … $response->end(); }); $http->start(); In that same project I was also looking to use a package that evolves around […]

Azure Functions Custom Handlers

Baller addition (in preview) to Azure Functions: Azure Functions offers first-class support for a limited number of languages. Now in preview, register custom handlers by providing a lightweight HTTP server in any desired language. Use this new capability to extend the language support for your applications, enabling the use of languages or language versions not […]

Laraguard – Two Factor Authentication via TOTP for all your Users out-of-the-box.

Two Factor Authentication via TOTP for all your Users out-of-the-box. This packages adds a Contract to detect in a per-user basis if it should use Two Factor Authentication. It includes a custom view and a listener to handle the Two Factor authentication itself during login attempts. It is not invasive, but you can go full […]

How to refactor complex if-statements

In this video, which is a part of the Mailcoach video course, Freek shows us how he refactors a complex if-statement. A technique which I nowadays also like using myself – especially in a React Component’s render method – is to use early returns: instead of nesting if-statements and using else-statements, the function body uses […]

Symfony 5: The Fast Track

Symfony 5 recently got released. Fabien Potencier – Symfony’s creator – has also published a book along with its release. This book – written by Symfony’s creator – lays out a pragmatic approach to developing web applications with Symfony 5: from scratch to production. Whether you are discovering Symfony for the first time or refreshing […]

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 […]