PHP Annotated Monthly – April 2016

php-annotated-monthlySpring is finally here, and the PHP conference season is in full flow. Gary Hockin once again rounds up the latest news from the PHP community, in Annotated Monthly.

PHP

Our usual round of PHP releases, current versions of PHP are:

It may be tedious, but I feel obliged to remind you that these are the only three minor versions that are receiving security fixes, so if you are running 5.4.x, or (shock horror!) anything older, you are in real trouble, and I urge you to upgrade!

The Web Development Blog posted an excellent small and straightforward tutorial on Simple PHP Code Debugging, while basic, may be useful if you’re new or need reminding of these techniques. Reza Lavaryan posted on the ever prolific SitePoint – A Comprehensive Guide to Using Cronjobs, which outlines how and when to use Cronjobs to run PHP scripts regularly.

Community veteran Paul M Jones blogged on PSR-7 and Session Cookies which explains how you can use PSR-7 compliant middleware to handle session cookies. One of my favourite posts of the last month was by Adam Wathan, who posted an outstanding description of how to transpose submitted form data into collections in the catchily named post, Cleaning Up Form Input with Transpose.

The Cloudways Blog released Using Memcached With PHP, which explains why you need to use an in-memory data store, and how to use it with PHP. SitePoint continued their rich month with a couple of posts that explain how you can contribute to PHP;  Contributing to PHP: How to Fix Bugs in the PHP Core and Contributing to PHP: How to Contribute to PHP’s Manual.

Another post that has an interesting concept is by Jeff GeerlingStreaming PHP – disabling output buffering in PHP, Apache, Nginx, and Varnish.  Because simple is always better, I also recommend Simplifying Conditional Expressions on the Zaengle blog.

He’s the Ze in Zend, and here Zeev Suraski tells us that PHP 7 Is Gaining Momentum. Finally for this month, flowerpot holding Evert Pot responds to the RFC proposing to drop the `var` keyword in PHP, by saying we should Drop ‘public’ not ‘var’! It’s an interesting if somewhat controversial view, and a decent read.

Frameworks and Tools

First up, the big news… Composer, the PHP package manager (and if you didn’t know that you must have been living under a rock for the past few years) has “gone gold”! In layman’s terms, this means that it’s finally moved from beta to stable, with the release of version 1.0.0, and a unique gold floppy disk has been created to celebrate. The scary thing about this is that if like me, you’ve been relying on Composer for the last five years, then you’ve built your entire build process around beta software!

In Laravel News, a Laravel Cheat Sheet has been released. Steve Azzopardi blogged on Setting up UUIDs in Laravel 5+. The big news in Laravel is that Laravel Spark Site Launched (and Screencast Posted). Laravel Spark is a new initiative from Laravel head-honcho Taylor Otwell that aims to remove the boilerplate that you often need when creating a Laravel (or any other) project. It looks very, very, interesting, and I’m looking forward to giving it a try. Another noticeable post in Laravel is The Ultimate Guide to Sending Email in Laravel,

The Zend Framework Blog posted an informative article entitled Issues, Tags, and Closures (oh my), that outlines how the project will attempt to triage old issues and then move them from the central repository to the actual repository that they relate to. It’s written by a very handsome and eloquent individual too.

Over in Symfony, Unicode breaking Loïc Faugeron posted another series of informative articles, my favourite being Super Speed Symfony – ReactPHP. It outlines how you can use an event loop framework like ReactPHP to bootstrap your framework only once and therefore remove the considerable overhead of your full stack framework. It’s an interesting idea that I’ve discussed with a few people at events recently.

We should probably get the obligatory hipster posts out of the way, so let’s cover off Docker quickly. I enjoyed both PHPBuilder’s post on Working with Docker and PHP, and the Semaphore CI Tutorials’ tutorial Dockerizing a PHP Application. There was also a similar post on the Geeky Platypus (you can’t make this stuff up) blog, Dockerise your PHP application with Nginx and PHP7-FPM. Like Vagrant only a few short years ago, if you aren’t using Docker, you’re doing it wrong (apparently).

In Slimland, Joe P Ferguson blogged on how you can use Laravel Homestead to develop your Slim application in his post Adding Homestead to a SlimPHP App. I have been a vocal adversary of framework-specific tools, so this looks like a fascinating direction. Staying on the Laravel-to-Slim theme, the world’s most laid back man Rob Allen wrote another interesting article on how you can use the Eloquent ORM from Laravel in your Slim 3 application – Using Eloquent in Slim Framework. Good stuff.

Finally, Lorna Mitchell blogged on how to create a Simple Access Control for CakePHP3.

Community (and more)

We’ve mentioned people with Unicode breaking names previously, so let’s quickly also suggest Cloudways Blog interviewing AOL stalwart Samantha Quiñones. As head of distributing AOL dial-up CDs to the world, Samantha (as always) gives an entertaining and exciting interview.

Who hasn’t found the answer to a long-standing problem on Stack Overflow? If you aren’t saying “me” out loud right now, you are most probably lying. Every year they run a developer survey, and the results are in. Get them while they are relevant at Developer Survey Results 2016.

Podcasters around the world are united in their hatred of my sarcastic references to their paltry output (except Cal), but here, for the record, are the latest podcast releases:

Conference season is well underway now, and I really enjoyed both Midwest PHP and Lone Star PHP. I’ll be manning our booth at php[tek] in May, so I hope to run into you there. As usual, if you have anything you’d like to see featured, or any comments, compliments or criticisms, then get in touch!

– Gary and the PhpStorm Team

JetBrains

The Drive to Develop

image description