Lorna Mitchell: Generating a File List for Phan

Lorna Mitchell has shared a tip she’s found helpful when using the phan static analysis tool for finding only PHP files via a simple grep.

Phan is the PHP Analyzer for PHP 7 code. I’ve been using it, partly out of curiosity, and partly to look at what the implications of upgrading my various projects will be. […] I generated my filelist.txt files with a little help from grep – by looking for all files with opening PHP tags in, and putting that list of filenames into a file.

The phan tool is still pretty young but it provides a good example of how to use the new php-ast handling to parse and analyze PHP code.


Jordi Boggiano: PHP Versions Stats – 2015 Edition

It’s come to "that time of year" again and Jordi Boggiano has posted the latest update in his series of PHP usage statistics. In this summary he looks at the PHP versions installed based on the packagist.org logs for developers using Composer.

It’s that time of the year again, where I figure it’s time to update my yearly data on PHP version usage. Last year’s post showed 5.5 as the main winner and 5.3 declining rapidly. Let’s see what 2015 brought.

[…] A quick note on methodology, because all these stats are imperfect as they just sample some subset of the PHP user base. […] Composer sends the PHP version it is running with in its User-Agent header, so I can use that to see which PHP versions people are using Composer with. Of course this data set is probably biased towards development machines and CI servers and as such it should also be taken with a grain of salt.

He first compares the statics for his 2015 searches against the 2014 stats and shows the differences in usage for PHP versions 5.3.3 up to 5.6.0. Fortunately, the results show a rise in the usage of PHP 5.5 and a decline in all others…but it’s not too much of a difference (2-3% range). Pie graphs are also included to help visualize these differences. He also includes some statistics on what PHP versions are required by certain packages for the ones listed on Packagist with increases starting with 5.4 and the largest advance for 5.5.


SitePoint PHP Blog: Sourcehunt PHP: Contribute to Crypto, Validation, Payments…

The SitePoint PHP blog has published the first edition of their "Sourcehunt" effort, sharing several PHP libraries to promote them and give them wider exposure to the community at large. In this post they talk about tools covering a wide range of functionality including cryptography, validation, user agent parsing and "humanizing" strings.

Last month, we introduced a new effort called Sourcehunt – a category of post intended to direct attention to less popular open source projects that show promise and need exposure. We’ve called for new submissions and accumulated an impressive list.

Included in their list for this edition are tools like:

…and many more. A summary of the features, code and output examples are provided for most of the tools mentioned and the number of GitHub stars at the time of the posting is listed next to each library name.


Matthieu Napoli: Approaching coding style rationally

In a post to his site Matthieu Napoli shares some of his thoughts about "code style rationality" including code formatting in general and some suggestions on one of the harder things in development – naming things.

Habits are sometimes making us blind. We think X looks prettier than Y but that’s just the habit speaking. In this article I’ll try to take a rational approach at coding style. That means leaving the “it looks ugly/better” at the door.

If at any point you feel like something “just doesn’t look good”, breath in, breath out, and try it! Nothing beats hands-on experience, not even some random article on the internet.

He looks at a few subjects specifically (there’s way too many to cover them all in detail):

  • the use of trailing commas
  • alignment of values in docblock comments
  • keeping docblock comments minimal
  • using the "Interface" suffix
  • using the "Exception" suffix

He ends the post by reminding readers that the point is to think about code style logically and that no rules are written in stone.


Alfred Nutile: Laravel Training: The Laravel Maven and the Laravel Novice

Alfred Nutile has posted information about a series of Laravel-related training videos that aim to help you go from "Laravel 0 to Deploy" as they walk you through the creation and deployment of a simple blog based on the Laravel framework features.

The two of us come together in this raw footage of building a Blog in Laravel. You get both the insights of an experienced Laravel Software Writer (Alfred Nutile) and the questions of a WordPress developer new to Laravel, (Joe Bacal)

As of the time of this post there’s four episodes in the series with more planned:

Other topics to come include working with Homestead, managing Gulp dependencies, creating a contact form and working with single page applications.


Thijs Feryn: Interviewing Gary Hockin from JetBrains (Dev Evangelism, travel, PHPStorm & PHP cons)

Thijs Feryn has posted his latest in his series of video interviews with members of the PHP community. In this latest episode he talks with Gary Hockin of JetBrains about developer evangelism, the PHPStorm IDE and community conferences.

A couple of weeks ago I was in Las Vegas for Zendcon where I had to opportunity to chat with a lot of friends from the PHP community. This week’s episode features Gary Hockin, developer evangelist at JetBrains. Gary advocates the PHPStorm project and is a proud Welshman.

Because Gary and I are both evangelists, one of the central themes of the interview is developer evangelism. We talk about the life, the travel, the public speaking, but also about the not so glamorous parts of the job. Throughout the conversation we also talk about PHPStorm and PHP community conferences.

You can watch the video either through his in-page video player or over on YouTube. If you prefer the audio-only route, you can also listen on SoundCloud. You can also check out previous interviews Thijs has done in this category on his site.


Community News: Recent posts from PHP Quickfix (11.04.2015)

Recent posts from the PHP Quickfix site:

  • Running LDAP tests on travis-ci
    #phpquickfix, #ldap, #test, #travisci, #unittest, #pear
  • Improving Your PHP Project Structure with Dependency Injection Part 1: How it Works? – PHP Dependency Injection Container package blog – PHP Classes
    #phpquickfix, #phpclasses, #dependency, #injection, #part1, #container
  • 10 less-known (but awesome!) Laravel Collections methods – Laravel Daily
    [object Object] #laravelquickfix, #collections, #methods, #top10, #awesome, #phpquickfix
  • Feral Concurrency Control: An Empirical Investigation of Modern Application Integrity | the morning paper
    #phpquickfix, #feral, #concurrency, #control, #application, #integrity
  • Changing Author Homepage URL Properly in WordPress | The Storyteller
    #phpquickfix, #wordpress, #author, #homepage, #url, #change
  • The Hitchhiker’s Guide to SQL Injection protection
    #phpquickfix, #sqlinjection, #sqli, #protection, #guide, #tutorial
  • PHP Package Checklist
    #phpquickfix, #package, #checklist, #development, #opensource
  • SymfonyCon Paris 2015 welcomes an additional track to its schedule! (Symfony Blog)
    #phpquickfix, #symfony, #somfonycon, #paris, #track
  • Running Symfony Applications with PHP-PM | Symfony Finland
    #phpquickfix, #symfony, #application, #phppm, #tutorial
  • Changing Apigility’s auth token expiry | Rob Allen’s DevNotes
    #phpquickfix, #apigility, #authentication, #token, #expire, #change
  • New in Symfony 2.8: Deprecated service definitions (Symfony Blog)
    #phpquickfix, #symfony2, #deprecated, #service, #definition, #feature
  • How to Securely Allow Users to Upload Files – Paragon Initiative Enterprises Blog
    #phpquickfix, #security, #file, #upload, #user, #tutorial, #websecquickfix
  • New Training: Symfony Forms Best Practices – webmozart.io
    #phpquickfix, #training, #symfony, #forms, #bestpractices
  • PHP 7 Nested Anonymous Classes Tutorial – PHP Classes blog – PHP Classes
    #phpquickfix, #phpclasses, #anonymous, #class, #php7, #nested
  • Container-Interop support for Prophiler > bitExpert AG
    #phpquickfix, #container, #interoperability, #support, #prophiler
  • How to examine the reports files for Magento | ESchrade – Kevin Schroeder’s Blog
    #phpquickfix, #magento, #report, #files, #examine