The PHP Process Runner library provides an easy-to-use way of running an external CLI command that you can quickly drop into your own project to save you time and effort.
It is based on the CommandLib code from DataSift's Storyplayer.
Run this command to add this library to your composer.json
file:
composer require ganbarodigital/php-process-runner