PHP Annotated Monthly – January 2015
Here we are with another PHP Annotated Monthly, where our developer advocates Maarten and Anderson highlight the most interesting content from around the web from the past month.
Before we dive in, we want to wish you a very HaPHPy New Year! Now grab a hot beverage and enjoy reading through the latest PHP news that’s covered in this edition of the PHP Annotated Monthly!
PHP
Another month, another round of PHP releases. There’s now PHP 5.4.36, PHP 5.5.20 and PHP 5.6.4. A list of all bugfixes and security fixes can be found in the changelog.
On the RFC front, there are a couple of interesting ones that appeared. Stas Malyshev proposes objects as hash keys. He wrote an elaborate blog post about it, too. Andrea Faulds proposes scalar type hints for int, float, string and bool.
Nikita Popov wrote about the new hashtable implementation for PHP7. It seems a lot of work has been one on making them consume much less memory, which should also improve performance of working with them. Good read about how PHP’s internals!
Sara Golemon posted about cooperative multitasking in HHVM. Similar to threading, it allows multiple code paths to execute in parallel, yet only one section of code executes at any given moment. It looks interesting to be able to do work while waiting for an HTTP response or database query result!
Frameworks
The Joomla! community received a fresh drop in the 2.5 series in the form of Joomla! 2.5.28. It’s the final (scheduled) release of that branch and support for it now officially ended. A fond farewell, 2.5!
The Symfony team looks back at their past year, covering the website, the documentation and more. We’re guessing they have a busy year ahead, with Symfony 3.0 planned for November 2015!
WordPress has been busy! They released WordPress 4.1 “Dinah”, with a new default theme and a new distraction-free writing mode. There’s now also a “log out everywhere” feature and plugin recommendations as well.
Community/other
In our last PHP Annotated Monthly, we covered Composer’s new –prefer-lowest argument. Evert Pot blogged about how we can test our Composer packages for breaking changes in patch releases. He suggests package authors should try to nail down the oldest possible dependencies their package can still work with, and only increase that minimum version when it’s really needed.
Rob Allen needed to convert a simple data string received back from an API to a nicely formatted date in a Twig template. He blogged about solving his issue using a custom Twig extension.
Ever built a WordPress theme? Ever thought about doing it using Twig? Timber brings a way of doing so. Pretty slick, and a lot of people already seem to be using it if you look at the showcase. Here’s a how-to if you want to get started.
Julien Pauli posted an in-depth article about PHP’s output buffer. He covers the different nuts and bolts in output buffering, using multiple output buffers and even how to write a PHP extension that taps into output buffering.
Omed Habib blogged about common PHP performance issues and what to do to solve them. He covers opcode caching, database and file system issues and the remote API’s being consumed by our applications.
Looking for a web host that supports a specific PHP version? Look no more! Phil Sturgeon started PHP Versions, a site where you can find which hoster supports which PHP versions.
Which Composer packages implements which classes or exposes which interfaces? That’s what Packanalyst tries to answer with their search engine. The PSR LoggerInterface seems to be implemented in a large number of packages. I for one would love to have an API for this!
Nothing sucks more than not getting a code review from a team member in time. Or a one-line code change that is reviewed and needs changes, then needs more changes and then some more. So frustrating! Brandon Savage blogs about the common pitfalls of code review and how to fix them.
There are lots of ways to improve our developer skills. Christoph Rumpel gave a few tips on his blog. My takeaway? Never give up! And watch out for the latest hypes. And use what you can, adds Stefan Koopmanschap. And Bruno Skvorc adds some New Year’s resolutions for all of us.
After you’ve patched your git client, it’s a good time to learn how to write Git commit messages. Chris Beams covers the importance of adding the necessary context to a commit message so going back in history does not require re-establishing that context.
Deleting sensitive information from GitHub does not save you. Jordan Wright posts about GitHub’s firehose and what people could do with it. For example mine Bitcoins on your Amazon EC2 account for $2375 after an API key was in a GitHub repository for just a few minutes.
Did you find an interesting read? Have news to share? Or you just want to comment on this post? We’d love to see hear from you in the comments below. Feel free to reach out to our PhpStorm evangelists @maartenballiauw and @duodraco on Twitter.
See you next month!
Develop with pleasure!
– JetBrains PhpStorm Team