{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/5460","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5460/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5460/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5460/events","html_url":"https://github.com/joomla/joomla-cms/pull/5460","id":52263364,"number":5460,"title":"CLI extensions installer","user":{"login":"nikosdion","id":256041,"avatar_url":"https://avatars.githubusercontent.com/u/256041?v=3","gravatar_id":"","url":"https://api.github.com/users/nikosdion","html_url":"https://github.com/nikosdion","followers_url":"https://api.github.com/users/nikosdion/followers","following_url":"https://api.github.com/users/nikosdion/following{/other_user}","gists_url":"https://api.github.com/users/nikosdion/gists{/gist_id}","starred_url":"https://api.github.com/users/nikosdion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikosdion/subscriptions","organizations_url":"https://api.github.com/users/nikosdion/orgs","repos_url":"https://api.github.com/users/nikosdion/repos","events_url":"https://api.github.com/users/nikosdion/events{/privacy}","received_events_url":"https://api.github.com/users/nikosdion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2014-12-17T16:52:14Z","updated_at":"2015-01-05T13:20:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/5460","html_url":"https://github.com/joomla/joomla-cms/pull/5460","diff_url":"https://github.com/joomla/joomla-cms/pull/5460.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/5460.patch"},"body":"# Executive summary\r\n\r\nThis PR introduces a command-line interface (CLI) extensions installer. This allows automation of extension installation (new installs and updates) using command line tools. It can be used on various scenarios including, but not limited to, virtual machine provisioning (see Vagrant), automated tests for extension integration, mass updates of hundreds of sites in a hosting environment and so on. The script in this PR offers an equivalent to all of the installation methods allowed by the Extensions Manager in the back-end of your Joomla! site.\r\n\r\n# Testing instructions\r\n\r\nFor testing purposes we are going to install the same dummy extension in several ways. After each installation please check that the extension is installed on your site. Then remove it and test the next method. There are eight tests in total, including the short and long command versions. _Important_: Being familiar with the command line environment is necessary, given the nature of this PR.\r\n\r\n## Using an XML update stream (equivalent to Install from Web)\r\nRun this script as\r\n`php /path/to/site/cli/install-extension.php -w \"http://akeebatest.s3.amazonaws.com/dummy/update.xml\"`\r\nAlso try the long command version\r\n`php /path/to/site/cli/install-extension.php --web=\"http://akeebatest.s3.amazonaws.com/dummy/update.xml\"`\r\n\r\n## Using an extension package URL (equivalent to Install from URL)\r\nRun this script as\r\n`php /path/to/site/cli/install-extension.php -u \"http://akeebatest.s3.amazonaws.com/dummy/com_dummy-1.2.0.a1.zip\"`\r\nAlso try the long command version\r\n`php /path/to/site/cli/install-extension.php --url=\"http://akeebatest.s3.amazonaws.com/dummy/com_dummy-1.2.0.a1.zip\"`\r\n\r\n## Using a local extension package (equivalent to Install from Package File)\r\nDownload the [installation package](http://akeebatest.s3.amazonaws.com/dummy/com_dummy-1.2.0.a1.zip) into a directory, let's call it `/foo/bar`. DO NOT extract it! Now run\r\n`php /path/to/site/cli/install-extension.php -p \"/foo/bar/com_dummy-1.2.0.a1.zip\"`\r\nAlso try the long command version\r\n`php /path/to/site/cli/install-extension.php --package=\"/foo/bar/com_dummy-1.2.0.a1.zip\"`\r\n\r\n## Using a local directory (equivalent to Install from Directory)\r\nDownload the [installation package](http://akeebatest.s3.amazonaws.com/dummy/com_dummy-1.2.0.a1.zip) AND extract it into a directory, let's call it `/foo/bar`. Now run\r\n`php /path/to/site/cli/install-extension.php -f \"/foo/bar/com_dummy-1.2.0.a1.zip\"`\r\nAlso try the long command version\r\n`php /path/to/site/cli/install-extension.php --folder=\"/foo/bar/com_dummy-1.2.0.a1.zip\"`\r\n\r\n# Backwards compatibility\r\nNo b/c issues are present. This is a new CLI script which doesn't interfere with existing functionality.\r\n\r\n# Translation impact\r\nOne new translation file added (language/en-GB/en-GB.cli_install_extension.ini) with 22 language strings. Expected translation impact: about 8 minutes.\r\n\r\n# Credits and acknowledgments\r\nThis PR is inspired by the CLI extension installation scripts written by [Nicola Galgano](https://github.com/alikon/joomla-platform-examples/blob/master/Joomla%20CLI%20App/cli/jeicli.php) and [yours truly](https://github.com/akeeba/vagrant/blob/master/vagrant/files/joomla/install-joomla-extension.php). It seems that many of us are reinventing the same small but very convenient wheel."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/68706467","html_url":"https://github.com/joomla/joomla-cms/pull/5460#issuecomment-68706467","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5460","id":68706467,"user":{"login":"wilsonge","id":1986000,"avatar_url":"https://avatars.githubusercontent.com/u/1986000?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonge","html_url":"https://github.com/wilsonge","followers_url":"https://api.github.com/users/wilsonge/followers","following_url":"https://api.github.com/users/wilsonge/following{/other_user}","gists_url":"https://api.github.com/users/wilsonge/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonge/subscriptions","organizations_url":"https://api.github.com/users/wilsonge/orgs","repos_url":"https://api.github.com/users/wilsonge/repos","events_url":"https://api.github.com/users/wilsonge/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonge/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T13:20:54Z","updated_at":"2015-01-05T13:20:54Z","body":"How far would this run though. I'm thinking logically the 3 methods that people would likely use in an install script are ```isSite```, ```isAdmin``` and ```enqeueMessage```. I mean I know technically it could be anything. But I'd imagine these 3 would regularly appear"}}