PHP-FIG and PSR-7 Middleware

The PHP-FIG recently announced an entrance vote for PSR-7 which is all about creating a standard HTTP middleware interface. The community raised some potential issues and the Reddit thread got a little crazy.

I’ve been trying to keep up with the discussion but with it mixed between Reddit, the official mail list, and Twitter it feels impossible. This week on That Podcast, Beau Simensen and Dave Marshall, discuss the topic and do a great job on covering both sides.

The biggest sticking point seems to be around passing a response into the Middleware. The current proposal says it’s required and the others are saying are you sure about that?

The discussion around all this is fine and that’s what should be happening when a standards body is attempting to put out proposals that will affect everyone.

As an outsider what I see as the problem is the editor isn’t taking any of the feedback serious. It’s like watching kids on a playground where one sticks his fingers in ears and screams I CAN’T HEAR YOU!

With some big names leaving the group, a shady member, and another competing group starting up, it might be time for them to reevaluate the groups purpose. It feels like a turning point for the PHP-FIG and which way they choose will determine it’s future relevance.

PHP Unanimously Approves Short List Syntax for Array Destructuring

The PHP RFC for square bracket syntax for array destructuring assignment has passed and will be included in PHP 7.1 The vote needed a 2/3 majority to be accepted, and it passed with a unanimous vote in favor.

Short array syntax was added to PHP 5.4 and it allowed you to define arrays in a square bracket style:

// Old array style 
$array = array(1, 2, 3); 
// 5.4 square bracket style. 
$array = [1, 2, 3];

With the accepted proposal it creates an alternative to using “list” for destructuring an array. In all previous versions of PHP this works like this:

list($a, $b, $c) = array(1, 2, 3);

Now you can extract using a square bracket just as you do for assignment:

[$a, $b, $c] = [1, 2, 3];
["a" => $a, "b" => $b] = ["a" => a, "b", => 2];

It also works in foreach loops:

foreach ($points as ["x" => $x, "y" => $y]) {
    var_dump($x, $y);
}

You can find out more from the [PHP RFC](https://wiki.php.net/rfc/short_list_syntax_ and look for this in the PHP 7.1 release.

Manage your newsletter subscriptions through RSS

In the past few years, there has been a shift in the way people create content. Previously everyone had a blog and used that as their tool of choice to share their tips and ideas. Many are now moving to email newsletters and not publishing elsewhere.

RSS is dying and social media has such a short lifespan that email is one of the few tools still available to get in touch with readers.

A byproduct of this shift is that now inboxes are full of so many newsletters that it’s impossible to keep up. In fact, I’m getting more and more picky on who I subscribe to and even have friends with newsletters that I haven’t joined because I don’t want another email in my inbox.

Feedbin an online RSS reader just announced a new feature that gives you a unique email address (found through the settings) and it pipes anything sent to it to your RSS feed. This is a great way of bringing back the joy of RSS with the move to newsletters.

Here is a screenshot of the Laravel News newsletter shipped right into my feed reader:

Newsletter in Feedbin

With this integration, you can still stay up to date with your favorite authors and read their work on your time, instead of leaving them laying around your inbox striving for your attention.