Check for updates on PHP dependencies with `composer outdated`
Just yesterday it came to my attention that you can run composer outdatedto check if newer versions of dependencies you are using exist: Composer → Related: npm-check-updates does the same for Node
View ArticleEasily interact with Google Calendar from PHP with...
Great new package by spatie: use Spatie\GoogleCalendar\Event; //create a new event $event = new Event; $event->name = 'A new event'; $event->startDateTime = Carbon\Carbon::now();...
View ArticleImage diffing using PHP
PHP package by Undemanding to calculate how much difference (in percent) there is between two images: use Undemanding\Difference\Image; use Undemanding\Difference\Method\EuclideanDistance; $image1 =...
View ArticlePHP HTTP Public-Key-Pinning Builder
HTTP Public-Key-Pinning Builder aims to make it easy to build HTTP Public-Key-Pinning headers in your PHP projects. As so: <?php use \ParagonIE\HPKPBuilder\HPKPBuilder; $hpkp =...
View ArticleCauditor – PHP Code Audit and Visualisations
Great tool by Matthias Mullie, to analyzing your PHP code (in the screenshot above you can see the analysis of ansi-php): Figure out complexity hotspots in the blink of an eye from a couple of very...
View ArticleValidating SSL certificates with PHP
Great stuff again by Freek Murze from Spatie: A PHP class to easily check the validity of an SSL Certificate. Easily? Yes, easily: $certificate = SslCertificate::createForHostName('spatie.be');...
View ArticleImproving readability using array_filter
Great trick by Freek Van der Herten: instead of selectively adding fields onto an array after having verified them to not being falsy – resulting in lots of if blocks in the code – it’s actually a lot...
View ArticleMinify: A JavaScript and CSS Minifier Written in PHP
MatthiasMullie\Minify is a JavaScript and CSS Minifier written in PHP. Usage is straightforward: use MatthiasMullie\Minify; $sourcePath = '/path/to/source/css/file.css'; $minifier = new...
View ArticleGetting ready for PHP 7.1
In short: Catching multiple exception types Curl HTTP/2 server push support Support class constant visibility Void return types Generalize support of negative string offsets Allow specifying keys in...
View ArticleLaravel Uptime Monitor
Today Freek from spatie released a new package: Laravel-uptime-monitor is a powerful, easy to configure uptime monitor. It will notify you when your site is down (and when it comes back up). You can...
View ArticleUsing XDebug with PHPStorm
We assume that you use PHPStorm on a daily basis, and this guide will help to debug your code locally using the IDE. A remote debugging guide will come in the future. Make PHPStorm your new home –...
View ArticleFacebook Live Reactions
Facebook Live Reactions is a Linux script for creating Facebook Live Streams that contains interactive reaction counts. It also includes an interactive shoutout feature that gives live shoutouts to...
View ArticlePrivate Packagist
Mid-December Nils Adermann – Co-Founder of Packagist Conductors & Creator of Composer for PHP – announced Private Packagist. Being a hosted service, setting up your own Composer package repository...
View ArticleEasily manipulate images in PHP with spatie/image
Great new package by the folks at Spatie to working with images in PHP, powered by Glide. Glide itself is great, but uses an URL based approach (which has its benefits); yet in most cases I find...
View ArticleSnapshot testing with PHPUnit
use Spatie\Snapshots\MatchesSnapshots; class OrderTest { use MatchesSnapshot; class test_it_casts_to_json() { $orderId = new Order(1); $this->assertMatchesJsonSnapshot($order->toJson()); } }...
View ArticleGetting ready for Symonfy 4.0
Fabien Potencier, founder and project lead of Symfony: Symfony 4.0 will be released at the end of November 2017. During the next few weeks, I will publish articles about my ideas and the main changes...
View ArticleZttp, a developer friendly wrapper for Guzzle
If you’re not familiar with the evolution of Guzzle, the library has basically gotten more professional and less usable with each new version. New layers upon layers of specification-respecting...
View ArticleAutomatically rerun PHPUnit tests when source code changes with phpunit-watcher
Nice new package by Freek from Spatie.be. Think of it like Jest, but for PHP: Wouldn’t it be great if your PHPUnit tests would be automatically rerun whenever you change some code? This package can do...
View ArticleSilex Routing vs Trailing Slashes
In Silex-based projects I always define my routes with a trailing /. When defining a route with a trailing slash, the router will respond to both the route without and with slash:...
View ArticleGetting Ready for PHP 7.2
PHP 7.2 is planned to be released on 30th November 2017. And it comes with two new security features in the core, several smaller improvements and some language legacy clean-ups. In the article, I...
View Article