{"id":29419980,"url":"https://github.com/allebb/executioner","last_synced_at":"2025-07-12T01:15:13.457Z","repository":{"id":7713379,"uuid":"9078603","full_name":"allebb/executioner","owner":"allebb","description":"Executioner is a PHP library for executing system processes and applications with the ability to pass extra arguments and read CLI output results.","archived":false,"fork":false,"pushed_at":"2022-12-25T00:31:17.000Z","size":47,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T12:26:36.332Z","etag":null,"topics":["exec","executable","execute","executor","php","task"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allebb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-28T14:18:54.000Z","updated_at":"2023-03-23T12:24:42.000Z","dependencies_parsed_at":"2023-01-13T14:28:30.382Z","dependency_job_id":null,"html_url":"https://github.com/allebb/executioner","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/allebb/executioner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allebb%2Fexecutioner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allebb%2Fexecutioner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allebb%2Fexecutioner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allebb%2Fexecutioner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allebb","download_url":"https://codeload.github.com/allebb/executioner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allebb%2Fexecutioner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263004945,"owners_count":23398328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exec","executable","execute","executor","php","task"],"created_at":"2025-07-12T01:15:07.940Z","updated_at":"2025-07-12T01:15:13.432Z","avatar_url":"https://github.com/allebb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Executioner\n\n[![Build](https://github.com/allebb/executioner/workflows/build/badge.svg)](https://github.com/allebb/executioner/actions)\n[![Code Coverage](https://codecov.io/gh/allebb/executioner/branch/master/graph/badge.svg)](https://codecov.io/gh/allebb/executioner)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/allebb/executioner/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/allebb/executioner/?branch=master)\n[![Code Climate](https://codeclimate.com/github/allebb/executioner/badges/gpa.svg)](https://codeclimate.com/github/allebb/executioner)\n[![Latest Stable Version](https://poser.pugx.org/ballen/executioner/v/stable)](https://packagist.org/packages/ballen/executioner)\n[![Latest Unstable Version](https://poser.pugx.org/ballen/executioner/v/unstable)](https://packagist.org/packages/ballen/executioner)\n[![License](https://poser.pugx.org/ballen/executioner/license)](https://packagist.org/packages/ballen/executioner)\n\nExecutioner is a PHP library for executing system processes and applications with the ability to pass extra arguments and read CLI output results.\n\n## Requirements\n\nThis library is unit tested against PHP 7.3, 7.4, 8.0, 8.1 and 8.2!\n\nIf you need to use an older version of PHP, you should instead install the 3.x version of this library (see below for details).\n\n## License\n\nThis client library is released under the MIT license, a [copy of the license](https://github.com/allebb/executioner/blob/master/LICENSE) is provided in this package.\n\n## Installation\n\nTo install the package into your project (assuming you are using the Composer package manager) you can simply execute the following command from your terminal in the root of your project folder:\n\n```composer require ballen/executioner```\n\n\n**If you need to use an older version of PHP, version 3.x.x supports PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1 and 7.2, you can install this version using Composer with this command instead:**\n\n```shell\ncomposer require ballen/executioner ^3.0\n```\n\n## Usage example\n\nExample of retrieving IP address information for the server.\n```php\n\nuse Ballen\\Executioner\\Executioner;\n\n$run = new Executioner();\n\nif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n    $run-\u003esetApplication('ipconfig'); // Server is Microsoft Windows!\n} else {\n    $run-\u003esudo() // Lets assume we must run 'sudo' to get the output...\n        -\u003esetApplication('ifconfig');\n}\n$run-\u003eexecute();\n\n// We'll simply just display the results as a plain text string...\necho $run-\u003eresultAsText();\n```\n\nAn example of getting the PHP version number using ``php -v`` terminal command.\n\n```php\nuse Ballen\\Executioner\\Executioner;\n\n/**\n * A shorthand version of using the factory method to create a new instance\n * and then chaining the other methods and getting the response.\n */\n$php_version = Executioner::make('php')\n    -\u003eaddArgument('-v')\n    -\u003eexecute()\n    -\u003eresultAsArray();\n$words = explode(' ', $php_version[0]); // Split the words from the first line of the output!\n$extracted_version_number = $words[1]; // The second word in the raw outputted line should be the version number :)\necho 'The extacted version number is: ' . $extracted_version_number . '';\n\n// The extacted version number is: 7.0.0\n```\n\nThese examples can also be found in the [examples](examples) directory.\n\n## Tests and coverage\n\nThis library is fully unit tested using [PHPUnit](https://phpunit.de/).\n\nI use [GitHub Actions](https://github.com/) for continuous integration, which triggers tests for PHP 7.3, 7.4, 8.0, 8.1 and 8.2 each time a commit is pushed.\n\nIf you wish to run the tests yourself you should run the following:\n\n```shell\n# Install the Cartographer Library (which will include PHPUnit as part of the require-dev dependencies)\ncomposer install\n\n# Now we run the unit tests (from the root of the project) like so:\n./vendor/bin/phpunit\n```\n\nCode coverage can also be run, and a report generated (this does require XDebug to be installed)...\n\n```shell\n./vendor/bin/phpunit --coverage-html ./report\n```\n\n## Support\n\nI am happy to provide support via. my personal email address, so if you need a hand drop me an email at: [ballen@bobbyallen.me]().","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallebb%2Fexecutioner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallebb%2Fexecutioner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallebb%2Fexecutioner/lists"}