PHP Annotated Monthly – September 2015

PHP Annotated Monthly

As the autumn conference season begins to ramp up, it’s time for the September edition of PHP Annotated Monthly – bringing you all the news, tips, tricks and tutorials from the PHP community.

Once again, this month has been compiled by Gary Hockin – Developer Advocate for PhpStorm.

PHP

At the time of writing, the September releases have not been launched by the PHP team, so the latest versions are still  5.6.125.5.28 and 5.4.44. It’s worth repeating that PHP 5.4 hits end of life on the 14th of September, which means that PHP 5.4 will stop receiving any kind of updates — even security fixes — from the 14th of this month. With PHP 5.5 already in the security fixes only stage, NOW is the time to upgrade your servers to PHP 5.6. The migration documentation on the PHP official website can help.

The exciting news it that RC1 of PHP 7 has been released. The PHP 7 juggernaut just keeps on rolling, and I, for one, am very excited. It’s well worth giving PHP 7 a try with your existing codebase. Not only can you see the speed increases for yourself, but by logging any bugs you find you’ll be helping everyone get a stable PHP 7 on release day.

PHP.net have released their official PHP 7 Migration Guide, while Symfony have announced 100% PHP 7 compatibility which is great news for users of the framework.

Joe Fallon blogged well on Immutable Objects in PHP – immutable objects are a cornerstone of the PSR-7 standard, and it’s well worth understanding them. Sitepoint published a compelling article – Re-introducing PDO – the Right Way to Access Databases in PHP. Understanding PDO can be missed with modern framework and abstraction layers, so it’s well worth understanding these fundamentals.

Laracasts has started a very interesting series on PHP 7 Up and Running which is definitely worth a watch – they are part of the free offering which is a nice bonus. A sober Phil Sturgeon posted on why you should Avoid Hardcoding HTTP Status Codes, he makes some valid points and introduces a few libraries that may prove useful.

Save Memory by Switching to Generators by Evert Pot is a really nice introduction on how and why to use generators in your application, definitely worth a read if you don’t use generators, or don’t understand what they are and where their place is in your toolset. There’s also an interestingly styled PHP Object-Oriented Programming Beginner’s Guide on the StarTutorial site. It’s a useful primer for people looking to get a solid grounding in how and why OOP works in PHP.

Frameworks and Tools

A number of frameworks have had updated versions in the last month:

In addition to this, Slim PHP version 3 released it’s RC1, which is a fantastic milestone in a very good micro-framework. The ever prolific Rob Allen has blogged on the Improved Error Handling in Slim 3 RC1. If you’re interested in learning more about Slim 3, then Rob has blogged several times this month, so I recommend checking out his blog at akrabat.com.

While we are covering Slim 3, Andrew Smith has publish a post explaining Why is Slim 3 Not So Slim Anymore –  which, contrary to it’s title explains why Slim is still slim, despite the perceived size increase; it’s worth a read.

Anna Filina posted an interesting short post on Forcing Doctrine to Persist – it may be a problem that others have encountered.

Paul M. Jones has written a very thought provoking piece on Frameworks Are Not Tools, while Bruno Skvorc wrote a really cool post on BDD in Laravel: Getting Started with Behat and PhpSpec. I recommend you check it out even if you don’t use Laravel but are interested in learning BDD as it has value to everyone, not only Laravel users.

The Zend Framework Blog announced Expressive – a new micro framework based on some Zend Framework components, it aims to make PSR-7 middleware applications easy to develop. Personally, the big news here was the ZF team’s step away from the NIH philosophy; it bundles with Aura’s router, and includes interfaces for non-ZF components. It’s a refreshing approach.

The Symfony blog lets you know How to Upgrade Twig to 2.0 using deprecation notices to help, and on a similar note, Barry vd. Heuvel posted an article Comparing Blade and Twig Templates in Laravel.

Community (and more)

It’s been a busy month for community (as usual), with Larry Garfield posting one of the most interesting posts of the month – Just How Insular is the PHP Community? Larry pulled all the speaker data he could from the talk review site joind.in and used it to challenge some preconceptions about the community.

The great people at PHP Mentoring have launched an app that aims to make the job of mentors finding apprentices, and apprentices finding mentors much easier. I can highly recommend the process of either being a formal mentor, or having a formal mentor (I’ve done both), so if you’re looking for some help and guidance in your career, or are looking to help someone out, please check them out.

Joe Ferguson has blogged a very interesting post on his observations On Community Silos at Laracon US. While completely anecdotal, the observations and conclusions are very interesting for many.

Taking up the challenge from August, the podcasting community has deliberately tried to make my life difficult by inundating me with new episodes to post – Cal Evans of Voices of the ElePHPant has been particularly spiteful by releasing 5 episodes in the last month:

I’m sure there are many many great podcasts I’m missing, if you want to see yours listed here – give me a tweet!

Conference season is hotting up, with open calls for papers at:

Again, if you have an open CFP and would like to see it listed, get in touch.

I hope you had a productive month and look forward to doing it all again in October.

Develop with pleasure!
– JetBrains PhpStorm Team

image description