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

PHP 7.0.0 RC 8 Released
Nov 26, 2015 @ 08:36:56

The latest (and last in the series) Release Candidate for PHP 7 has been released as mentioned on php.net today. This is a development preview release only and is not intended to be used in production.

The PHP development team announces the immediate availability of PHP 7.0.0 RC 8. This is the thirteenth pre-release of the new PHP 7 major series. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system. [...] PHP 7.0.0 RC 8 contains fixes for 11 reported bugs.

This release fixes several final bugs that were preventing the final stable release of PHP 7.0.0, some relatively major. You can download this latest release from either the QA download page or from the Windows QA site. If you're interested in what's changing in this release (and in PHP 7 overall) check out the NEWS file.

tagged: php7rc8 release candidate language final development preview

Link: http://php.net/archive/2015.php#id2015-11-26-1

PHP 7.0.0 RC 7 Released
Nov 12, 2015 @ 11:22:41

On PHP.net today they've announced the released of the latest (and hopefully last) Release Candidate before the final, stable version of PHP 7 is announced: PHP 7.0.0. RC7.

The PHP development team announces the immediate availability of PHP 7.0.0 RC 7. This is the twelfth pre-release of the new PHP 7 major series. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

[...] This release candidate is unplanned and ships instead of the announced RTM for the reasons of yet additional quality improvement. If no major issues appear within the usual two-week test period, the 7.0.0 general availability (GA) release will be brought out. You can also read the full list of planned releases on our wiki.

You can find the complete list of changes in the NEWS file. You can get the download of this latest release from either the QA source download page or the windows.php.net QA site. Remember, this is a release candidate version and is not meant to be used in production.

tagged: php7 php7rc7 releasecandidate release preview development language version

Link: http://php.net/archive/2015.php#id2015-11-12-1

Kinsta Blog:
10 Things Not To Do In PHP 7
Nov 11, 2015 @ 09:53:36

On Kinsta.com Daniel Pataki has posted a list of seven things not to do in PHP 7 when it's finally released. It's no secret that there's a lot of new functionality coming with this new version but that also potentially means some bad practices coming along with them.

I’ve already shared some of the upcoming features of PHP 7, in this article I thought I’d take a look at some of the bad patterns we should stop using as we switch to the lightning fast PHP 7.

Among the things on his list are suggestions like:

  • Do Not Use mysql_ Functions (removed from core)
  • Do Not Use PHP Close Tags At The End Of A file
  • Do Not Perform Queries In A Loop
  • Do Not Trust User Input

Some of the suggestions do have a direct relation to what PHP 7 has to offer but most of them are just good practices to follow during your development work. Quite a few good tips in there, especially if you're relatively new to the language and want to start with PHP 7 and go.

tagged: php7 top10 opinion development practice habits recommendation

Link: https://kinsta.com/blog/10-things-not-to-do-in-php-7/

SitePoint PHP Blog:
Can PuliPHP Re-Revolutionize PHP Package Development?
Oct 08, 2015 @ 11:17:56

In this recent post to the SitePoint PHP blog Nicola Pietroluongo looks at a newer tool in the PHP ecosystem that builds on to of the already widely popular Composer to expand packages outside of just the PHP code - Puli.

Puli is a new toolkit built on top of [Composer](https://getcomposer.org) that helps to manage and exchange resources like configuration files, images, CSS files, translation catalogs, and others. These are, you’ll agree, often difficult to maintain and share across projects.

The article starts with a brief overview of how it works and where it connects in with Composer, pulling in other dependencies as defined in a puli.json file. It then walks you through the creation of a simple package - installing the Puli CLI tool, building out the project file/folder structure and mapping resources/assets into the bundle. Finally they show how to install a demo package they've created, how the project maps in to the application and the pieces that make it up. The post ends with a look at the "resource discovery" feature Puli also includes making it easier to pull in configuration options without having to manually define them.

tagged: puli package development tutorial bundle asset dependency

Link: http://www.sitepoint.com/can-puliphp-re-revolutionize-php-package-development/

Dependencies in Disguise
Sep 28, 2015 @ 08:48:27

On the PHP.cc's site has an article that looks at dependencies in disguise based on a "workshop" one of their members, Stefan Priebsch, gave at the recent Bulgaria PHP Conference.

Yesterday I gave a presentation at the [Bulgaria PHP Conference](https://thephp.cc/dates/2015/09/bulgaria-php-conference) (a great event, by the way). Following an [ad-hoc workshop](https://twitter.com/s_bergmann/status/647732967087939584) that I gave as part of the hallway track and an entertaining hackathon, I decided it was too late to join the party and went back to the hotel with some other speakers. Checking out how the day was reflected in social media, I contributed a few more tweets to a [conversation](https://twitter.com/tim_bezhashvyly/status/647861115721003008) that had started earlier in the day ([here](https://thephp.cc/dates/2015/09/bulgaria-php-conference/solid-mvc) are the slides of my talk that people are referring to). I am writing this to clarify my point, and help everybody to understand better.

He talks about dependency injection as a best practice that's followed in libraries all over the PHP ecosystem, making it easier to work with objects and their needs. Sometimes this means using a dependency injection container and others it's just constructor/method injection. He talks about how these objects are build in factory methods and recommends making one factory but points out that this only really works when all the objects you need are known up front. However, he gives several (code) examples of places where this could be difficult and how some are using service locators to solve the problem. He points out, however, that this then expands the API of the application out way too far, opening it up to objects all across the application when there may be no need. This is where the hidden dependencies can come in, things masked behind the use of a single service locator. He recommends solving the issue with more customized locators, as in his example of routing locator used to handle dependencies for a POST HTTP request.

tagged: dependency disguise injection service locator bestpractice solid development

Link: https://thephp.cc/news/2015/09/dependencies-in-disguise

Matthew Weier O'Phinney:
On 10 Years at Zend
Sep 21, 2015 @ 17:53:36

Matthew Weier O'Phinney has spent the last ten years of his career working for Zend as a part of their Zend Framework team. In this post to his site he looks back over the years, how it all started and where he is today.

10 years ago, as I write this, I was on a plane from Burlington, VT, to San Jose, CA, where I'd be starting work at Zend Technologies the next day as a PHP Developer.

He talks about where he started out at Zend (the eBiz team) and the kind of work he was given. It was early on that he started working with an internal, new project at the time: Zend Framework. He looks at some of his early contributions to the project and his "trial by fire" when he was asked to help give a tutorial about it at that year's ZendCon. He also mentions some of the people he's worked with along the way and gives thanks to the founding Zend team. Zend Framework was one of the first major frameworks out there and paved the way for the framework-driven environment we find ourselves in now. With Zend Framework v2 it encouraged a component-based system that spread quickly across the entire PHP community. Thank you Matthew for all of your hard work over the years, not just in the Zend Framework ecosystem but in the PHP community as a whole.

tagged: matthewweierophinney zend decade zendframework team development

Link: https://mwop.net/blog/2015-09-19-zend-10-year-anniversary.html

Allan MacGregor:
TDD is not Dead
Sep 08, 2015 @ 10:30:01

Allan MacGregor has a post to his site with some of his thoughts on why TDD isn't dead and is still a viable option to help reduce bugs and improve software quality.

So, where does this whole TDD is DEAD thing came from? Well, it all started with let's say a provocative talk and follow up blog post by David Heinemeier Hansson (@DHH) where he expressed his frustration with testing and put into question the value of TDD. [...] TDD is not dead, not really. And it won't really ever be dead, it will change or be replaced with something better; in fact it already has, and in my Magento Extension Test Driven Development book we focus on Behavior Driven Development, an approach that emerged from the original TDD methodology.

He goes through each of the points that DHH mentions in his post and offers some of his own thoughts on the topic:

  • Developers make you feel like your is dirty if you don't practice TDD
  • Driving design from unit tests is not a good idea
  • TDD notion of "fast tests" is shortsighted
  • 100% coverage is silly.
  • TDD created test-induced design damage.

He ends with the most common misconception about testing in general too: i"t's too much work/it will make my development slower." He also looks at some of these kinds of comments specifically targeted at Magento 2.

tagged: tdd testdriven development dead opinion dhh

Link: http://coderoncode.com/testing/magento/2015/09/03/tdd-is-not-dead.html

Inviqa Blog:
Testing myths debunked
Aug 12, 2015 @ 11:20:14

The Inviqa blog has posted an article that seeks to debunk some common testing myths when it comes to ensuring quality in software development (and its results). They cover eleven different points with a rebuttal for each, refuting them as excuses and possible misunderstandings.

Software testing has been around for many years now but over this time some incorrect assumptions have arisen about what testing is, what the process involves and how the process of testing can add value to the software development process. Here we take a look at some of the more common myths about testing and, from a tester’s point of view, provide correct and valid information for each point.

Among the myths they cover are things like:

  • "Bugs come from lazy developers"
  • "If we test it for long enough, we’ll catch all of the bugs"
  • "Developers and testers are like cat and dog"
  • "Testing is boring"
  • "We don’t need testers"

Each includes a paragraph or two of content pointing out the problems with the statement and offering some constructive ways to help solve it in your organization.

tagged: testing myth debunked list software development qualityassurance

Link: http://inviqa.com/blog/testing-myths-debunked/

Eric Barnes:
How to set up your Mac for local PHP Development
Aug 05, 2015 @ 10:48:14

Eric Barnes has posted a guide to helping you set up (as he sees it) a good PHP development environment on your Mac that includes Homebrew for package management, Composer, Vagrant and the Laravel Homestead VM for project hosting.

This past weekend I decided it was finally time to wipe my Macbook’s hard drive and start fresh. I have used it daily for several years now and still had artifacts from when I used Mamp. Since then Vagrant has turned to my local server of choice and one of the reasons is how clean you can keep your machine by utilizing it.

After finishing the new Mac OS X install it felt like a new beginning. So clean, so minimal. [...] This go around I wanted to keep it as minimal as possible and only install things I know I need and use. This tutorial covers how I set up my Mac for local PHP Development.

His list of software includes the previously mentioned four as well as the ZSH shell replacing the default bash and, obviously, PHP itself installed via Homebrew.

tagged: osx mac local development homestead composer zsh vagrant homebrew

Link: http://ericlbarnes.com/set-mac-local-php-development/

Joeri Verdeyen:
How I develop in PHP with CoreOS and Docker
Jul 29, 2015 @ 11:41:14

Joeri Verdeyen has posted a tutorial showing you how to use a combination of CoreOS and Docker as a PHP development environment. This is an alternative to the more frequently used Vagrant VM provisioning popular among developers.

I’ve been using the Vagrant provisioned-with-Ansible-setup for a while now. But for the last month(s) I’ve been playing around with things like: Docker, boot2docker, CoreOS, etcd, .. I managed to setup a fast and easy way to develop my PHP applications. Symfony2 is my preferred weapon of choice, so I’ll explain how I’m developing a Symfony2 app.

He starts with the software you'll need installed to get his example up and running, all installable via "brew". He shows how to configure the CoreOS via Vagrant and bring the box up. He then sets up the Docker client to point to the newly created VM as its server. He then creates a docker-compose.yml file to set up the necessary services including nginx, MySQL and (of course) PHP. He then shows the command to run the container, execute the configuration and ensure that all containers are configured correctly. Finally he runs the Composer installation command (Symfony2, remember) and clear the cache.

tagged: coreos docker vagrant development environment tutorial configuration symfony2

Link: https://www.jverdeyen.be/docker/how-php-symfony-coreos-docker/