Valet 3.0: Multiple/Parallel PHP Version Support

For my local PHP Development needs I use Laravel Valet. It’s easy to set up, provides HTTPS, and just works. The only downside of using it, is the fact that the selected PHP version is system-wide: switching PHP versions — using valet use php@7.4 for example — affects all sites. With the 3.0 release of …

Laravel Zero – Micro-framework for console applications

Laravel Zero is a lightweight and modular micro-framework for developing fast and powerful console applications. Built on top of the Laravel components. Think of it as a stripped down Laravel, without the public folder. Recently used it to create a Command that runs in Docker Container upon boot and then exits. Instead of using Laravel’s …

PHP Monitor — Visual PHP Version Switcher that integrates with Laravel Valet

If you’re just getting started with PHP and/or Homebrew, the whole CLI aspect to install and manage PHP versions can become a bit overwhelming. With PHP Monitor by Nico Verbruggen that task becomes easier to handle. Lightweight, native Mac menu bar app that interacts with Laravel Valet. Helps you manage multiple PHP installations, locate config …

PHP Cloud Functions on Google Cloud Platform with “Functions Framework for PHP”

Google Cloud Platform has launched official support for PHP Cloud Functions using Functions Framework for PHP. With it, an HTTP Cloud Function becomes as simple as this: use Psr\Http\Message\ServerRequestInterface; function helloHttp(ServerRequestInterface $request): string { $queryString = $request->getQueryParams(); $name = $queryString['name'] ?? $name; return sprintf('Hello, %s!', $name); } Functions that respond to Cloud Events can work …

Unconventional Autoloaders in PHP

Recording from the October 2020 edition of Laravel Worldwide Meetup where Liam Hammet (starting at 36:58​) showed off some nice use cases for custom autoloaders in PHP: We use autoloaders in PHP all the time, but if you change your mindset a little, you’ll find they can do a lot more than you might’ve thought. …

PHP Curl Security Hardening

Good post — with accompanying code — on PHP.Watch on how to tighten the almighty curl: Limit Curl Protocols Do not enable automatic redirects unless absolutely necessary If redirects are enabled enabled, limit allowed protocols (if different from #1 above) If redirects are enabled, set a strict limit Set a strict time-out Do not disable …

Ray – Dump Debugging Evolved

The folks over at Spatie have released a new tool called Ray that helps you with debugging. Ray is a beautiful, lightweight desktop app that helps you debug your app. After installing one of the libraries to send information to Ray, you can use the ray() function to quickly dump stuff. Any variable(s) that you …

It’s not legacy code — it’s PHP

In 2004 Vimeo wrote their first backend code in PHP. 16 years later and they (mainly) still run PHP. Many developers wrote a bit of PHP a decade ago and have since moved on to better-respected languages. They’re often eager to tell others how relieved they are to not be writing PHP anymore, and how …