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

A Caddy config file for PHP Applications

Mattias Geniar shared his Caddyfile – a config file for the high promising Caddy Webserver – for use with a Laravel backed website. His config file takes care of all of these: Redirect all versions of the domain to domain.tld, without the www-prefix Enable gzip compression Store logs in the home dir of the site, […]

Bref – Serverless PHP Functions on AWS

Bref comes as a Composer package and helps you deploy PHP applications to AWS and run them on AWS Lambda. Bref uses the Serverless framework to configure and deploy serverless applications. Being the most popular tool, Serverless comes with a huge community, a lot of examples online and a simple configuration format. After installing an […]

Avoid Guzzle 6.5.0 (aka How to fix “Use of undefined constant INTL_IDNA_VARIANT_UTS46” on CentOS 6)

There’s a bug in Guzzle 6.5.0 in which it does not play nice with systems that have an older ICU library (which PHP’s Intl extension uses). CentOS 6 for example ships with a very old ICU version, without any (offical) means of updating it. The bug should be fixed in (the unreleased) Guzzle 6.5.1. It […]

SymfonyCloud – Serverless Deployment Platform for Symfony

Reduce hosting costs. Stop wasting time and energy finding, building and maintaining your own stack. We cover it all, from PHP to database, search, security and performance. Enable any service by adding a few lines in a configuration file. SymfonyCloud supports all PHP versions. Each service is deployed in its own custom, lightweight container for […]

Laravel Vapor – Serverless Deployment Platform for Laravel

If you’re building Laravel-based app and don’t want to burdened with the infrastructure side of things, check out Laravel Vapor which was announced last summer. Laravel Vapor is a serverless deployment platform for Laravel, powered by AWS. Launch your Laravel infrastructure on Vapor and fall in love with the scalable simplicity of serverless. Next to […]

Getting started with GitHub Actions and Laravel (~PHP)

Ruben Van Assche from Spatie: When GitHub released its new product: GitHub Actions a whole new world opened for developers. Let’s dive right in and see what it brings for the Laravel community. In How to set up PHP for use in a GitHub Action I’ve layed out how to use shivammathur/[email protected] in GitHub Actions. […]