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/setup-php@v1 in GitHub Actions. …

Run a PHP app in a Docker Container (Notes)

The past week I took a closer look at the several options on how to run a PHP app with Docker. In the past I’ve ran a few pre-built containers, but now I wanted to truly get to the bottom of it all as I don’t always need a full blown container with all extensions, …

How to set up PHP for use in a GitHub Action

To use PHP in a GitHub action there’s the magnificent setup-php action. It also allows for installing extensions and setting several php.ini directives. steps: – name: Checkout uses: actions/checkout@v1 – name: Setup PHP uses: shivammathur/setup-php@v1 with: php-version: '7.4' extensions: mbstring, intl #optional, setup extensions ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration coverage: xdebug #optional, setup …

Upgrade to PHP 7.4 with Homebrew on Mac

Brent has done a writeup on how to upgrade your Homebrew-installed PHP version to PHP 7.4. Since the php formula now contains that 7.4 version (instead of 7.3 before), all you need to do is make sure brew is up-to-date and then upgrade the php formula itself: # make sure brew is up-to-date brew update …

Automatically upgrade your PHP code from 5.3 to PHP 7.4 with Rector

Rector is a reconstructor tool – it does instant upgrades and instant refactoring of your code. Why refactor manually if Rector can handle 80% for you? Installation per Composer: composer require rector/rector –dev For example, to upgrade the contents of the ./src folder: vendor/bin/rector process src –set php74 The cool thing is that Rector uses …