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

Zend Developer Zone:
Testing your project with PHP 7.1
Aug 23, 2016 @ 17:20:12

On the Zend Developer Zone author Cal Evans has written up a post showing you how to test your application with PHP 7.1, the upcoming minor release version for the PHP 7.x series.

Both PHP 7.0 and the upcoming PHP 7.1 release are fairly benign releases. They do not break backwards compatibility except in a few edge cases. If you’ve not yet moved to PHP 7.0, check out our posts tagged php7 for details on what might trip you up there.

Regardless of what version you are moving to, 7.0 or 7.1, you are going to want to test your application before you make the move in production. Sometimes that is difficult though you need a server properly configured, you need someone to manage it, most importantly, you need unit tests. While I can’t help you with that last one – other than point you to @grmpyprogrammer who will publicly abuse you until you write them – I can help you with the “where to test” problem.

Cal shows how to make use of Docker containers to easily test your application in a more self-contained environment and make it simpler to swap out the PHP versions in your platform. He walks you through the steps you'll need to follow to get the environment set up, pull down required components, install and compile PHP and, finally, install Composer globally. Once set up, he shows how to log in, clone your project and execute its test suite. He finishes the post with a few comments about this being a "sandbox", not a CI environment and how it is "future proof" for later versions of PHP too (as it doesn't lock it down to just PHP 7.1.x).

tagged: testing project php71 docker container tutorial

Link: https://devzone.zend.com/7262/testing-project-php-7-1/


Trending Topics: