Quick Tip: Make Sure Your PHP Version is Safe with VersionscanBy Bruno Skvorc
There’s a tool you can use to check that you have a version of PHP with the most bugfixes. The tool is versionscan and it recently got a 1.0 release.
This quick tip will show you how to install it into your environment so it’s accessible from any folder, letting you call it at any future time without actually needing to require it inside a PHP project.
Step 0 – Optional – Homestead Improved
To follow along, you’d do well to set up a Homestead Improved instance. It’s Vagrant VM that’ll get you up and running with PHP 5.6+ in under five minutes, so you can test what we do here right away.
Step 1 – Composer Global Install
To make a tool accessible globally when it’s a Packagist-hosted Composer project, we install it with the global flag. Enter your VM (
vagrant ssh) and execute the following:
composer global require psecio/versionscan:dev-master
This installs the package globally – into Composer’s home folder. On Homestead Improved (see Step 0) Composer is already installed globally and can be called from any folder. If you’re not using the VM from Step 0, install Composer first, then proceed to this step.
Unless you install Composer globally, you might have to run the command like so:
php composer.phar global require ...
Step 2 – Run Versionscan
The output should be something like this:
That’s all there is to it. You now have an always-accessible critical issue scanner installed. There’s not much the tool can help you with other than pure awareness, but knowing is most definitely better than not knowing.
- 1 An Alternative Laravel Package Development Workflow
- 2 How to Build a Twitter Follower-Farmer Detection App with RestDB
- 3 How to Improve Site Performance (and Conversions) with Dareboost
- 4 Day Camp 4 Developers: PHP Application Security
- 5 Make Your Own Social Network, Game Server, or Knowledgebase! - Sourcehunt