summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-11-16 18:09:14 (GMT)
committerJon Pugh2017-11-16 18:09:14 (GMT)
commit2c5e2963bb810cda1cc0512016187549806951ad (patch)
tree635d3a374805cf594924da65dcbbb8ab58cf1ca1
parent780240ecea29bfa23058f21e471b375f7896f227 (diff)
First steps in utilizing robo as a framework:
- Create a "Provision" base class. - Load in our existing Application so our existing commands are still available. - Add a provision-robo.php executable file and change the include in bin/provision.
-rwxr-xr-xbin/provision2
-rw-r--r--bin/provision-robo.php27
-rw-r--r--composer.json1
-rw-r--r--composer.lock474
-rw-r--r--src/Application.php37
-rw-r--r--src/Console/Config.php3
-rw-r--r--src/Provision.php64
7 files changed, 506 insertions, 102 deletions
diff --git a/bin/provision b/bin/provision
index 694666c..f6e9235 100755
--- a/bin/provision
+++ b/bin/provision
@@ -1,4 +1,4 @@
#!/usr/bin/env php
<?php
-require 'provision.php';
+require 'provision-robo.php';
diff --git a/bin/provision-robo.php b/bin/provision-robo.php
new file mode 100644
index 0000000..234763f
--- /dev/null
+++ b/bin/provision-robo.php
@@ -0,0 +1,27 @@
+<?php
+
+use League\Container\Container;
+use Robo\Robo;
+// We use PWD if available because getcwd() resolves symlinks, which
+// could take us outside of the Drupal root, making it impossible to find.
+$cwd = empty($_SERVER['PWD']) ? getcwd() : $_SERVER['PWD'];
+
+// Set up autoloader
+$loader = false;
+if (file_exists($autoloadFile = __DIR__ . '/vendor/autoload.php')
+ || file_exists($autoloadFile = __DIR__ . '/../vendor/autoload.php')
+ || file_exists($autoloadFile = __DIR__ . '/../autoload.php')
+ || file_exists($autoloadFile = __DIR__ . '/../../autoload.php')
+) {
+ $loader = include_once($autoloadFile);
+} else {
+ throw new \Exception("Could not locate autoload.php. cwd is $cwd; __DIR__ is " . __DIR__);
+}
+
+$input = new \Symfony\Component\Console\Input\ArgvInput($argv);
+$output = new \Symfony\Component\Console\Output\ConsoleOutput();
+
+$app = new \Aegir\Provision\Provision($input, $output);
+
+$status_code = $app->run($input, $output);
+exit($status_code);
diff --git a/composer.json b/composer.json
index 2d63c44..2167afc 100644
--- a/composer.json
+++ b/composer.json
@@ -6,6 +6,7 @@
"type": "library",
"license": "GPL-2.0+",
"require": {
+ "consolidation/Robo": "^1.1",
"consolidation/annotated-command": "~2",
"drupal/console-core": "1.0.2",
"psr/log": "^1.0",
diff --git a/composer.lock b/composer.lock
index fe25733..c95ec4f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "25f4161ac19dde865bcef9fa9d341b03",
+ "content-hash": "9fedee2bcebf91f9ab5c9865d6d9f0eb",
"packages": [
{
"name": "consolidation/annotated-command",
@@ -58,6 +58,102 @@
"time": "2017-10-17T01:48:51+00:00"
},
{
+ "name": "consolidation/config",
+ "version": "1.0.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/consolidation/config.git",
+ "reference": "b59a3b9ea750c21397f26a68fd2e04d9580af42e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/consolidation/config/zipball/b59a3b9ea750c21397f26a68fd2e04d9580af42e",
+ "reference": "b59a3b9ea750c21397f26a68fd2e04d9580af42e",
+ "shasum": ""
+ },
+ "require": {
+ "dflydev/dot-access-data": "^1.1.0",
+ "grasmash/yaml-expander": "^1.1",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4",
+ "satooshi/php-coveralls": "^1.0",
+ "squizlabs/php_codesniffer": "2.*",
+ "symfony/console": "^2.5|^3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Consolidation\\Config\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Greg Anderson",
+ "email": "greg.1.anderson@greenknowe.org"
+ }
+ ],
+ "description": "Provide configuration services for a commandline tool.",
+ "time": "2017-10-25T05:50:10+00:00"
+ },
+ {
+ "name": "consolidation/log",
+ "version": "1.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/consolidation/log.git",
+ "reference": "74ba81b4edc585616747cc5c5309ce56fec41254"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/consolidation/log/zipball/74ba81b4edc585616747cc5c5309ce56fec41254",
+ "reference": "74ba81b4edc585616747cc5c5309ce56fec41254",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0",
+ "psr/log": "~1.0",
+ "symfony/console": "~2.5|~3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*",
+ "squizlabs/php_codesniffer": "2.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Consolidation\\Log\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Greg Anderson",
+ "email": "greg.1.anderson@greenknowe.org"
+ }
+ ],
+ "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.",
+ "time": "2016-03-23T23:46:42+00:00"
+ },
+ {
"name": "consolidation/output-formatters",
"version": "3.1.12",
"source": {
@@ -107,6 +203,116 @@
"time": "2017-10-12T19:38:03+00:00"
},
{
+ "name": "consolidation/robo",
+ "version": "1.1.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/consolidation/Robo.git",
+ "reference": "aea695cebff81d54ed6daf14894738d5dac1c15c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/consolidation/Robo/zipball/aea695cebff81d54ed6daf14894738d5dac1c15c",
+ "reference": "aea695cebff81d54ed6daf14894738d5dac1c15c",
+ "shasum": ""
+ },
+ "require": {
+ "consolidation/annotated-command": "^2.8.1",
+ "consolidation/config": "^1.0.1",
+ "consolidation/log": "~1",
+ "consolidation/output-formatters": "^3.1.5",
+ "league/container": "^2.2",
+ "php": ">=5.5.0",
+ "symfony/console": "~2.8|~3.0",
+ "symfony/event-dispatcher": "~2.5|~3.0",
+ "symfony/filesystem": "~2.5|~3.0",
+ "symfony/finder": "~2.5|~3.0",
+ "symfony/process": "~2.5|~3.0"
+ },
+ "replace": {
+ "codegyre/robo": "< 1.0"
+ },
+ "require-dev": {
+ "codeception/aspect-mock": "~1",
+ "codeception/base": "^2.2.6",
+ "codeception/verify": "^0.3.2",
+ "henrikbjorn/lurker": "~1",
+ "natxet/cssmin": "3.0.4",
+ "patchwork/jsqueeze": "~2",
+ "pear/archive_tar": "^1.4.2",
+ "phpunit/php-code-coverage": "~2|~4",
+ "satooshi/php-coveralls": "~1",
+ "squizlabs/php_codesniffer": "^2.8"
+ },
+ "suggest": {
+ "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch",
+ "natxet/CssMin": "For minifying CSS files in taskMinify",
+ "patchwork/jsqueeze": "For minifying JS files in taskMinify",
+ "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively."
+ },
+ "bin": [
+ "robo"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev",
+ "dev-state": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "scripts/composer/ScriptHandler.php"
+ ],
+ "psr-4": {
+ "Robo\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Davert",
+ "email": "davert.php@resend.cc"
+ }
+ ],
+ "description": "Modern task runner",
+ "time": "2017-10-25T20:41:21+00:00"
+ },
+ {
+ "name": "container-interop/container-interop",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/container-interop/container-interop.git",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "shasum": ""
+ },
+ "require": {
+ "psr/container": "^1.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Interop\\Container\\": "src/Interop/Container/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+ "homepage": "https://github.com/container-interop/container-interop",
+ "time": "2017-02-14T19:40:03+00:00"
+ },
+ {
"name": "dflydev/dot-access-configuration",
"version": "v1.0.2",
"source": {
@@ -446,6 +652,53 @@
"time": "2017-09-04T05:42:48+00:00"
},
{
+ "name": "grasmash/yaml-expander",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/grasmash/yaml-expander.git",
+ "reference": "9ec59ccc7a630eb2637639e8214e70d27675456b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/grasmash/yaml-expander/zipball/9ec59ccc7a630eb2637639e8214e70d27675456b",
+ "reference": "9ec59ccc7a630eb2637639e8214e70d27675456b",
+ "shasum": ""
+ },
+ "require": {
+ "dflydev/dot-access-data": "^1.1.0",
+ "php": ">=5.4",
+ "symfony/yaml": "^2.8.11|^3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8|^5.5.4",
+ "satooshi/php-coveralls": "^1.0",
+ "squizlabs/php_codesniffer": "^2.7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Grasmash\\YamlExpander\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthew Grasmick"
+ }
+ ],
+ "description": "Expands internal property references in a yaml file.",
+ "time": "2017-09-26T16:57:45+00:00"
+ },
+ {
"name": "jakub-onderka/php-console-color",
"version": "0.1",
"source": {
@@ -533,17 +786,82 @@
"time": "2015-04-20T18:58:01+00:00"
},
{
+ "name": "league/container",
+ "version": "2.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/container.git",
+ "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0",
+ "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0",
+ "shasum": ""
+ },
+ "require": {
+ "container-interop/container-interop": "^1.2",
+ "php": "^5.4.0 || ^7.0"
+ },
+ "provide": {
+ "container-interop/container-interop-implementation": "^1.2",
+ "psr/container-implementation": "^1.0"
+ },
+ "replace": {
+ "orno/di": "~2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "League\\Container\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Phil Bennett",
+ "email": "philipobenito@gmail.com",
+ "homepage": "http://www.philipobenito.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A fast and intuitive dependency injection container.",
+ "homepage": "https://github.com/thephpleague/container",
+ "keywords": [
+ "container",
+ "dependency",
+ "di",
+ "injection",
+ "league",
+ "provider",
+ "service"
+ ],
+ "time": "2017-05-10T09:20:27+00:00"
+ },
+ {
"name": "nikic/php-parser",
- "version": "v3.1.1",
+ "version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a"
+ "reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a1e8e1a30e1352f118feff1a8481066ddc2f234a",
- "reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/08131e7ff29de6bb9f12275c7d35df71f25f4d89",
+ "reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89",
"shasum": ""
},
"require": {
@@ -581,7 +899,7 @@
"parser",
"php"
],
- "time": "2017-09-02T17:10:46+00:00"
+ "time": "2017-11-04T11:48:34+00:00"
},
{
"name": "psr/container",
@@ -681,16 +999,16 @@
},
{
"name": "psy/psysh",
- "version": "v0.8.11",
+ "version": "v0.8.15",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "b193cd020e8c6b66cea6457826ae005e94e6d2c0"
+ "reference": "b1d289c2cb03a2f8249912c53e96ced38f879926"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b193cd020e8c6b66cea6457826ae005e94e6d2c0",
- "reference": "b193cd020e8c6b66cea6457826ae005e94e6d2c0",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b1d289c2cb03a2f8249912c53e96ced38f879926",
+ "reference": "b1d289c2cb03a2f8249912c53e96ced38f879926",
"shasum": ""
},
"require": {
@@ -704,7 +1022,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "~1.11",
"hoa/console": "~3.16|~1.14",
- "phpunit/phpunit": "~4.4|~5.0",
+ "phpunit/phpunit": "^4.8.35|^5.4.3",
"symfony/finder": "~2.1|~3.0"
},
"suggest": {
@@ -750,7 +1068,7 @@
"interactive",
"shell"
],
- "time": "2017-07-29T19:30:02+00:00"
+ "time": "2017-11-16T14:29:51+00:00"
},
{
"name": "stecman/symfony-console-completion",
@@ -799,16 +1117,16 @@
},
{
"name": "symfony/config",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "f9f19a39ee178f61bb2190f51ff7c517c2159315"
+ "reference": "8d2649077dc54dfbaf521d31f217383d82303c5f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/f9f19a39ee178f61bb2190f51ff7c517c2159315",
- "reference": "f9f19a39ee178f61bb2190f51ff7c517c2159315",
+ "url": "https://api.github.com/repos/symfony/config/zipball/8d2649077dc54dfbaf521d31f217383d82303c5f",
+ "reference": "8d2649077dc54dfbaf521d31f217383d82303c5f",
"shasum": ""
},
"require": {
@@ -857,20 +1175,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-09-04T16:28:07+00:00"
+ "time": "2017-11-07T14:16:22+00:00"
},
{
"name": "symfony/console",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a1e1b01293a090cb9ae2ddd221a3251a4a7e4abf"
+ "reference": "099302cc53e57cbb7414fd9f3ace40e5e2767c0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a1e1b01293a090cb9ae2ddd221a3251a4a7e4abf",
- "reference": "a1e1b01293a090cb9ae2ddd221a3251a4a7e4abf",
+ "url": "https://api.github.com/repos/symfony/console/zipball/099302cc53e57cbb7414fd9f3ace40e5e2767c0b",
+ "reference": "099302cc53e57cbb7414fd9f3ace40e5e2767c0b",
"shasum": ""
},
"require": {
@@ -925,20 +1243,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-09-06T16:40:18+00:00"
+ "time": "2017-11-12T16:53:41+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "8beb24eec70b345c313640962df933499373a944"
+ "reference": "74557880e2846b5c84029faa96b834da37e29810"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/8beb24eec70b345c313640962df933499373a944",
- "reference": "8beb24eec70b345c313640962df933499373a944",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/74557880e2846b5c84029faa96b834da37e29810",
+ "reference": "74557880e2846b5c84029faa96b834da37e29810",
"shasum": ""
},
"require": {
@@ -981,20 +1299,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-09-01T13:23:39+00:00"
+ "time": "2017-11-10T16:38:39+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "e593f06dd90a81c7b70ac1c49862a061b0ec06d2"
+ "reference": "4e84f5af2c2d51ee3dee72df40b7fc08f49b4ab8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e593f06dd90a81c7b70ac1c49862a061b0ec06d2",
- "reference": "e593f06dd90a81c7b70ac1c49862a061b0ec06d2",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4e84f5af2c2d51ee3dee72df40b7fc08f49b4ab8",
+ "reference": "4e84f5af2c2d51ee3dee72df40b7fc08f49b4ab8",
"shasum": ""
},
"require": {
@@ -1051,20 +1369,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2017-09-05T20:39:38+00:00"
+ "time": "2017-11-13T18:10:32+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "54ca9520a00386f83bca145819ad3b619aaa2485"
+ "reference": "271d8c27c3ec5ecee6e2ac06016232e249d638d9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/54ca9520a00386f83bca145819ad3b619aaa2485",
- "reference": "54ca9520a00386f83bca145819ad3b619aaa2485",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/271d8c27c3ec5ecee6e2ac06016232e249d638d9",
+ "reference": "271d8c27c3ec5ecee6e2ac06016232e249d638d9",
"shasum": ""
},
"require": {
@@ -1114,20 +1432,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-05T15:47:03+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "b32a0e5f928d0fa3d1dd03c78d020777e50c10cb"
+ "reference": "77db266766b54db3ee982fe51868328b887ce15c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b32a0e5f928d0fa3d1dd03c78d020777e50c10cb",
- "reference": "b32a0e5f928d0fa3d1dd03c78d020777e50c10cb",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/77db266766b54db3ee982fe51868328b887ce15c",
+ "reference": "77db266766b54db3ee982fe51868328b887ce15c",
"shasum": ""
},
"require": {
@@ -1163,20 +1481,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-07T14:12:55+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "b2260dbc80f3c4198f903215f91a1ac7fe9fe09e"
+ "reference": "138af5ec075d4b1d1bd19de08c38a34bb2d7d880"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/b2260dbc80f3c4198f903215f91a1ac7fe9fe09e",
- "reference": "b2260dbc80f3c4198f903215f91a1ac7fe9fe09e",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/138af5ec075d4b1d1bd19de08c38a34bb2d7d880",
+ "reference": "138af5ec075d4b1d1bd19de08c38a34bb2d7d880",
"shasum": ""
},
"require": {
@@ -1212,20 +1530,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-05T15:47:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.5.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803"
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
- "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@@ -1237,7 +1555,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.5-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1271,20 +1589,20 @@
"portable",
"shim"
],
- "time": "2017-06-14T15:44:48+00:00"
+ "time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/process",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0"
+ "reference": "a56a3989fb762d7b19a0cf8e7693ee99a6ffb78d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0",
- "reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0",
+ "url": "https://api.github.com/repos/symfony/process/zipball/a56a3989fb762d7b19a0cf8e7693ee99a6ffb78d",
+ "reference": "a56a3989fb762d7b19a0cf8e7693ee99a6ffb78d",
"shasum": ""
},
"require": {
@@ -1320,20 +1638,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-13T15:31:11+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "add53753d978f635492dfe8cd6953f6a7361ef90"
+ "reference": "373e553477e55cd08f8b86b74db766c75b987fdb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/add53753d978f635492dfe8cd6953f6a7361ef90",
- "reference": "add53753d978f635492dfe8cd6953f6a7361ef90",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/373e553477e55cd08f8b86b74db766c75b987fdb",
+ "reference": "373e553477e55cd08f8b86b74db766c75b987fdb",
"shasum": ""
},
"require": {
@@ -1385,20 +1703,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-07T14:12:55+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "89fcb5a73e0ede2be2512234c4e40457bb22b35f"
+ "reference": "805de6bd6869073e60610df1b14ab7d969c61b01"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89fcb5a73e0ede2be2512234c4e40457bb22b35f",
- "reference": "89fcb5a73e0ede2be2512234c4e40457bb22b35f",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/805de6bd6869073e60610df1b14ab7d969c61b01",
+ "reference": "805de6bd6869073e60610df1b14ab7d969c61b01",
"shasum": ""
},
"require": {
@@ -1453,20 +1771,20 @@
"debug",
"dump"
],
- "time": "2017-08-27T14:52:21+00:00"
+ "time": "2017-11-07T14:16:22+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.3.9",
+ "version": "v3.3.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "1d8c2a99c80862bdc3af94c1781bf70f86bccac0"
+ "reference": "0938408c4faa518d95230deabb5f595bf0de31b9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/1d8c2a99c80862bdc3af94c1781bf70f86bccac0",
- "reference": "1d8c2a99c80862bdc3af94c1781bf70f86bccac0",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/0938408c4faa518d95230deabb5f595bf0de31b9",
+ "reference": "0938408c4faa518d95230deabb5f595bf0de31b9",
"shasum": ""
},
"require": {
@@ -1508,7 +1826,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-07-29T21:54:42+00:00"
+ "time": "2017-11-10T18:26:04+00:00"
},
{
"name": "twig/twig",
@@ -1577,16 +1895,16 @@
},
{
"name": "webflo/drupal-finder",
- "version": "1.0.0",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/webflo/drupal-finder.git",
- "reference": "3216448cc347bc77127fa3bf6497ba9b3c296e9c"
+ "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/3216448cc347bc77127fa3bf6497ba9b3c296e9c",
- "reference": "3216448cc347bc77127fa3bf6497ba9b3c296e9c",
+ "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/8a7886c575d6eaa67a425dceccc84e735c0b9637",
+ "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637",
"shasum": ""
},
"require-dev": {
@@ -1610,7 +1928,7 @@
}
],
"description": "Helper class to locate a Drupal installation from a given path.",
- "time": "2017-08-08T08:31:26+00:00"
+ "time": "2017-10-24T08:12:11+00:00"
},
{
"name": "webmozart/assert",
diff --git a/src/Application.php b/src/Application.php
index 635dd2e..30b1e85 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -34,17 +34,6 @@ use Symfony\Component\Console\Application as BaseApplication;
*/
class Application extends BaseApplication
{
-
- /**
- * @var string
- */
- const NAME = 'Aegir Provision';
-
- /**
- * @var string
- */
- const VERSION = '4.x';
-
/**
* @var string
*/
@@ -56,6 +45,11 @@ class Application extends BaseApplication
const DEFAULT_TIMEZONE = 'America/New_York';
/**
+ * @var \Aegir\Provision\Tasks
+ */
+ public $robo;
+
+ /**
* @var LoggerInterface
*/
public $logger;
@@ -88,23 +82,22 @@ class Application extends BaseApplication
*
* @throws \Exception
*/
- public function __construct(InputInterface $input, OutputInterface $output)
+ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
{
// If no timezone is set, set Default.
if (empty(ini_get('date.timezone'))) {
date_default_timezone_set($this::DEFAULT_TIMEZONE);
}
+//
+// // Load Configs
+// try {
+// $this->config = new Config();
+// }
+// catch (\Exception $e) {
+// throw new \Exception($e->getMessage());
+// }
- // Load Configs
- try {
- $this->config = new Config();
- }
- catch (\Exception $e) {
- throw new \Exception($e->getMessage());
- }
-
- $this->console = $output;
- parent::__construct($this::NAME, $this::VERSION);
+ parent::__construct($name, $version);
}
/**
diff --git a/src/Console/Config.php b/src/Console/Config.php
index f516076..6c54d89 100644
--- a/src/Console/Config.php
+++ b/src/Console/Config.php
@@ -37,7 +37,8 @@ class Config implements ConfigurationInterface
* @var string
*/
private $config_filename = '.provision.yml';
-
+ const CONFIG_FILENAME = '.provision.yml';
+
/**
* {@inheritdoc}
*/
diff --git a/src/Provision.php b/src/Provision.php
new file mode 100644
index 0000000..d8447f0
--- /dev/null
+++ b/src/Provision.php
@@ -0,0 +1,64 @@
+<?php
+
+
+namespace Aegir\Provision;
+
+use Aegir\Provision\Commands\ExampleCommands;
+use Aegir\Provision\Console\Config as ConsoleConfig;
+
+use Robo\Common\ConfigAwareTrait;
+use Robo\Config\Config;
+use Robo\Robo;
+use Robo\Runner as RoboRunner;
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Provision {
+
+ const APPLICATION_NAME = 'Aegir Provision';
+ const REPOSITORY = 'aegir-project/provision';
+
+ use ConfigAwareTrait;
+
+ private $runner;
+
+ public function __construct(
+// Config $config,
+ InputInterface $input = NULL,
+ OutputInterface $output = NULL
+ ) {
+
+ // Create Robo configuration.
+ $config = Robo::createConfiguration([ConsoleConfig::getHomeDir() . DIRECTORY_SEPARATOR . ConsoleConfig::CONFIG_FILENAME]);
+ $config->setDefault('aegir_root', ConsoleConfig::getHomeDir());
+ $config->setDefault('script_user', ConsoleConfig::getScriptUser());
+ $config->setDefault('config_path', ConsoleConfig::getHomeDir() . '/config');
+
+ $this->setConfig($config);
+
+ // Create Application.
+ $application = new \Aegir\Provision\Application(self::APPLICATION_NAME, $config->get('version'));
+ $application->setConfig(new \Aegir\Provision\Console\Config());
+
+ // Create and configure container.
+ $container = Robo::createDefaultContainer($input, $output, $application, $config);
+// $this->setContainer($container);
+// $container->add(MyCustomService::class);
+
+ // Instantiate Robo Runner.
+ $this->runner = new RoboRunner([
+ ExampleCommands::class
+ ]);
+
+ $this->runner->setContainer($container);
+ $this->runner->setSelfUpdateRepository(self::REPOSITORY);
+ }
+
+ public function run(InputInterface $input, OutputInterface $output) {
+ $status_code = $this->runner->run($input, $output);
+
+ return $status_code;
+ }
+
+}