Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell:
Generating a File List for Phan
Nov 27, 2015 @ 10:38:33

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.

tagged: phan file list generate quick tip grep static analysis tool

Link: http://www.lornajane.net/posts/2015/generating-a-file-list-for-phan

SitePoint PHP Blog:
Sourcehunt PHP: Contribute to Crypto, Validation, Payments…
Nov 19, 2015 @ 11:17:54

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.

tagged: sourcehunt sitepoint library tool spotlight example summary

Link: http://www.sitepoint.com/sourcehunt-php-contribute-to-crypto-validation-payments/

SitePoint WordPress Blog:
How to Install and Use WP-CLI to Manage WordPress Websites
Nov 04, 2015 @ 09:19:13

On the SitePoint WordPress blog they've posted a tutorial showing you how to install and use the WP-CLI tool to manage your WordPress-powered websites.

Speeding up your work process should be one of your top priorities. Simply put, if you do more work in less time, then you will have more time to work on more projects, study and rest. WP-CLI is one of the command line tools specifically made to manage your WordPress websites through the command line. With a few simple commands, you can manage WordPress without even needing to login to your WordPress admin and navigate through the pages.

They start with some of the requirements to use the WP-CLI tool and follow it with the steps to get it installed and moved to the right place on your system. They then show off some of the functionality the command-line tool has to offer including:

  • working with the WP cache
  • installing WordPress core
  • installing themes and plugins

The WP-CLI tool also helps you keep your WordPress installation up to date, including core and themes/plugins too.

tagged: wordpress tutorial wpcli commandline tool install

Link: http://www.sitepoint.com/wp-cli/

QaFoo Blog:
Analyze the Quality Of Your PHP Code
Oct 23, 2015 @ 14:08:12

QaFoo has posted an announcement to their blog about a new tool they're offering to help developers better visualize the quality of their PHP code with a new visualization tool, the Quality Analyzer.

In code reviews we often browse metrics, source code and reported code issues together with our customers. This leads to discussions about the current state of the code and possible improvements. First we used a bunch of shells scripts for that. In a second step we developed a simple PHP (Open Source) application helping us to do the job. Now we did the third step and rewrote that application into a React based client side (Open Source) application.

They start with an overview of why they created the tool (an evolution of the older Code Review tool) and why it was split into a frontend/backend model to provide easier pipeline integration. They then introduce the functionality in the new tool, based on a D3.js interface. A few screenshots of the interface are also included to give you an idea of how it reports its findings and the dashboard providing an overview of the findings. You can try it out by grabbing it from the project's GitHub repository.

tagged: analyze quality code tool d3js visualize dashboard

Link: https://qafoo.com/blog/076_quality_analyzer.html

Symfony Blog:
Paving the way for Symfony 3 with the "Deprecation Detector" tool
Oct 22, 2015 @ 10:48:31

On the Symfony blog there's a post talking about a tool they've introduced that is helping to "pave the way" for the upcoming version 3 release of the Symfony framework - the Deprecation Detector tool.

Symfony 3 will be released at the end of November 2015. Learning from our own history, the transition from Symfony 2 to 3 will be much more pleasant than the transition from symfony 1 to 2 that happened in July 2011.

Technically speaking, Symfony 3 includes no new features comparing it with Symfony 2.8, which will be released at the same time. [...] This means that your Symfony applications won't work on Symfony 3 unless you remove all their deprecations. In order to simplify the task of finding which deprecations affect your applications, a new tool called Deprecation Detector has just been released.

The tool runs static analysis against your codebase and finds locations where you're using deprecated methods/classes/interfaces/etc and reports them back for fixing. The post includes the commands you'll need to get the tool installed and how to run it against your code. You can find out more about the project and get details on command line options on its GitHub repository.

tagged: deprecation detector symfony2 symfony3 method interface class service tool tutorial

Link: http://symfony.com/blog/paving-the-way-for-symfony-3-with-the-deprecation-detector-tool

Zend Developer Zone:
Introducing PHP 7 Express
Sep 18, 2015 @ 10:54:48

In a post on the Zend Developer Zone they've introduced a new offering from Zend as a part of their Zend Studio IDE - PHP 7 Express. This tool makes it easy to migrate your code to a working state with the upcoming PHP 7 release.

The PHP 7 revolution is well upon us and at the end of the year we should be seeing an official release. To help you prepare for the expected changes, the upcoming version of Zend Studio – Zend Studio 13, includes a new migration tool called PHP 7 Express. PHP 7 Express scans your PHP code for potential compatibility issues with PHP 7 and supplies you with all the information you need to get your projects ready for migration to PHP 7.

They give an example of refactoring as it relates to the uniform variable syntax changes and removing deprecated function calls. They walk you through the use of the tool (inside the IDE) and show an example of the results, how you can jump to the code for each of the issues listed and the recommendations it provides to correct it.

tagged: zend zendstudio php7express ide feature php7 optimize fix tool

Link: http://devzone.zend.com/6647/introducing-php-7-express/

Laravel News:
Installing Zend Z-Ray on Homestead
Aug 25, 2015 @ 10:45:01

On the Laravel News site there's a tutorial posted showing you how to Install the Zend Z-Ray tool on Homestead, the popular Laravel-related virtual machine environment. This tool helps with debugging applications by giving you an inside look (a sort of "x-ray") into its inner workings as it executes.

For the past week or so I have been running Zend Z-Ray in Laravel Homestead. Every time using it, new features come to light that are fantastic for debugging your apps in development! What follows is a quick preview of Z-Ray, along with all the steps necessary to install it on Laravel Homestead.

He talks some about the Z-Ray tool and the features it has to offer as well as some of the technologies it supports. He also covers some of the Laravel specific features included like project information, route inspection and current user information. He then gets into the Administration panel, what kinds of information it provides and, finally, how to get it all installed and working. It's not a super simple process but all the commands you'll need are included in the post.

tagged: install zray zend tool plugin laravel tutorial inspect

Link: https://laravel-news.com/2015/08/installing-zend-z-ray-on-homestead/

Community News:
Launching Today: The Code Climate Platform
Jun 22, 2015 @ 09:57:56

Code Climate, the popular static code analysis service, has made an announcement that will definitely help make checking your PHP application for quality and security issues easier - the release of the Code Climate Platform. This platform provides, among other things, a command line tool that you can use to run their analysis rules on your own systems.

Today, we’re thrilled to launch the Code Climate Platform − the first open, extensible platform for all types of static analysis. [...] What does this mean exactly? First, we’re open sourcing our analysis tools, including the engines and algorithms we use to evaluate code. We’re also enabling anyone to write static analysis engines that run on our servers by following a simple specification. [...] Finally, using our new Code Climate CLI, you can now run any Code Climate-compatible static analysis on your laptop – for free.

This is a great step forward to helping ensure the overall quality of your codebase and makes it even easier than having to rely on a fully external service for the results. Plus, with the specification you can write rules and customize the checks according to your application or framework of choice. They have a developer program you can register for to find out more information about that.

tagged: codeclimate static analysis tool commandline platform opensource specification developer program

Link: http://blog.codeclimate.com/blog/2015/06/19/code-climate-platform/

SitePoint PHP Blog:
Boxing up your Apps as Phars Quickly and Easily with Box
Jun 16, 2015 @ 08:44:27

The SitePoint PHP blog has a new tutorial posted showing you how to easily package up your application with Box to make phar files without the extra hassle of building them yourself.

In this tutorial, we’ll use Box to package a PHP application into a Phar, in order to make it easily distributable and globally installable via Composer.

For his example he uses the PHP portion of the FolderBuilder project and makes a command-line executable that can return the information for a directory as JSON data. He starts by installing the "box" executable command on a local VM and defines the simple configuration file, a "box.json" with some basic settings. He then clones the FolderBuilder project, updates the configuration for the correct locations and files and executes the "build" command. The result is a phar file that contains the PHP script functionality. He also updates the configuration to make the result executable with a "chmod" setting, removing the need to call it with the PHP command line version. He ends the post showing how to test it out, taking the results and dropping them into FolderBuilder to make sure they're 100% correct.

tagged: tutorial build phar archive easy box commandline tool

Link: http://www.sitepoint.com/boxing-apps-phars-quickly-easily-box/

SitePoint PHP Blog:
PHP7 Resource Recap
Apr 30, 2015 @ 09:46:10

With all the talk about PHP7 and the features that are coming with it, it's easy to get lost in the mound of information. Thankfully, the SitePoint PHP blog is here to help. They've posted a roundup of several PHP7-related resources you can use to sort things out (or start learning about) what's to come.

PHP 7 is well on its way. RFCs are being implemented and polished, projects are being tested, libraries upgraded. Extensions are being modified, and the word is spreading. All that remains is getting the shared hosts on the upgrade bandwagon – the arguably most difficult part of improving the global state of PHP. In this article, we’ll take a look at some of the most important PHP 7 related resources and tips you should go through in preparation for the new version.

Mentions in their list include both tutorials and tools including the PHP7 Vagrant box provided by Rasmus Lerdorf and the Go PHP7 Extensions effort to update extensions to be PHP7 ready. Following this there's serveral links to other important reading about what to expect and results of testing done with this upcoming version.

tagged: php7 resource recap summary tool article tutorial

Link: http://www.sitepoint.com/php7-resource-recap/