From b8fb3468173524ef290f51c0145d780ec0600a52 Mon Sep 17 00:00:00 2001 From: Samih Soylu Date: Wed, 24 Mar 2021 15:32:40 +0000 Subject: [PATCH] Moved interactive privateKey question out of execute() since this made a problem with no-interactive set ups --- CHANGELOG.md | 4 + README.md | 5 +- composer.lock | 241 ++++++++++++++++++------------------ src/Command/Setup/Setup.php | 21 ++-- src/Settings/Settings.php | 2 +- 5 files changed, 140 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14e6641..50d85a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +6.6.2 +----- +* Fixed a bug that prevented running a non-interactive setup + 6.6.1 ----- * Enabled PHP 8.0 support diff --git a/README.md b/README.md index 9d8e46e..c8bceb9 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,10 @@ tipctl setup You can also run the setup script with no user interaction ```shell script -tipctl setup --no-interaction --apiUrl 'https://api.transip.nl/v6' --loginName 'yourUsername' --apiPrivateKey 'yourKeyPair' --apiUseWhitelist true +tipctl setup --no-interaction --apiUrl='https://api.transip.nl/v6' --loginName='yourUsername' --apiPrivateKey='yourKeyPair' --apiUseWhitelist=true + +# When using spaces to separate an option from its value, you must escape the beginning of your private key +tipctl setup --no-interaction --apiUrl 'https://api.transip.nl/v6' --loginName 'yourUsername' --apiPrivateKey '\-----BEGIN PRIVATE KEY-----...' --apiUseWhitelist=true ``` ## Usage / Commands diff --git a/composer.lock b/composer.lock index 6c5475d..6c97701 100644 --- a/composer.lock +++ b/composer.lock @@ -8,22 +8,22 @@ "packages": [ { "name": "guzzlehttp/guzzle", - "version": "7.2.0", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79" + "reference": "7008573787b430c1c1f650e3722d9bba59967628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79", - "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7", + "guzzlehttp/psr7": "^1.7 || ^2.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0" }, @@ -31,6 +31,7 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.5 || ^9.3.5", @@ -44,7 +45,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.1-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -86,7 +87,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.2.0" + "source": "https://github.com/guzzle/guzzle/tree/7.3.0" }, "funding": [ { @@ -106,20 +107,20 @@ "type": "github" } ], - "time": "2020-10-10T11:47:56+00:00" + "time": "2021-03-23T11:33:13+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { @@ -159,22 +160,22 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" + "source": "https://github.com/guzzle/promises/tree/1.4.1" }, - "time": "2020-09-30T07:37:28+00:00" + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", "shasum": "" }, "require": { @@ -234,9 +235,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" + "source": "https://github.com/guzzle/psr7/tree/1.8.1" }, - "time": "2020-09-30T07:37:11+00:00" + "time": "2021-03-21T16:25:00+00:00" }, { "name": "psr/cache", @@ -289,27 +290,22 @@ }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -322,7 +318,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -336,9 +332,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/1.1.1" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/http-client", @@ -541,21 +537,21 @@ }, { "name": "symfony/cache", - "version": "v5.2.3", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "d6aed6c1bbf6f59e521f46437475a0ff4878d388" + "reference": "d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/d6aed6c1bbf6f59e521f46437475a0ff4878d388", - "reference": "d6aed6c1bbf6f59e521f46437475a0ff4878d388", + "url": "https://api.github.com/repos/symfony/cache/zipball/d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d", + "reference": "d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/cache": "~1.0", + "psr/cache": "^1.0|^2.0", "psr/log": "^1.1", "symfony/cache-contracts": "^1.1.7|^2", "symfony/polyfill-php80": "^1.15", @@ -569,9 +565,9 @@ "symfony/var-dumper": "<4.4" }, "provide": { - "psr/cache-implementation": "1.0", + "psr/cache-implementation": "1.0|2.0", "psr/simple-cache-implementation": "1.0", - "symfony/cache-implementation": "1.0" + "symfony/cache-implementation": "1.0|2.0" }, "require-dev": { "cache/integration-tests": "dev-master", @@ -616,7 +612,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.2.3" + "source": "https://github.com/symfony/cache/tree/v5.2.4" }, "funding": [ { @@ -632,7 +628,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T11:24:50+00:00" + "time": "2021-02-25T23:54:56+00:00" }, { "name": "symfony/cache-contracts", @@ -715,16 +711,16 @@ }, { "name": "symfony/console", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "24026c44fc37099fa145707fecd43672831b837a" + "reference": "c98349bda966c70d6c08b4cd8658377c94166492" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/24026c44fc37099fa145707fecd43672831b837a", - "reference": "24026c44fc37099fa145707fecd43672831b837a", + "url": "https://api.github.com/repos/symfony/console/zipball/c98349bda966c70d6c08b4cd8658377c94166492", + "reference": "c98349bda966c70d6c08b4cd8658377c94166492", "shasum": "" }, "require": { @@ -784,7 +780,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.19" + "source": "https://github.com/symfony/console/tree/v4.4.20" }, "funding": [ { @@ -800,20 +796,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-22T18:44:15+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "83a6feed14846d2d9f3916adbaf838819e4e3380" + "reference": "715e7a531bdae109a828f9e91629e5b3b2926beb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/83a6feed14846d2d9f3916adbaf838819e4e3380", - "reference": "83a6feed14846d2d9f3916adbaf838819e4e3380", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/715e7a531bdae109a828f9e91629e5b3b2926beb", + "reference": "715e7a531bdae109a828f9e91629e5b3b2926beb", "shasum": "" }, "require": { @@ -846,7 +842,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v4.4.19" + "source": "https://github.com/symfony/filesystem/tree/v4.4.20" }, "funding": [ { @@ -862,20 +858,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-11T19:34:41+00:00" }, { "name": "symfony/finder", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "25d79cfccfc12e84e7a63a248c3f0720fdd92db6" + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/25d79cfccfc12e84e7a63a248c3f0720fdd92db6", - "reference": "25d79cfccfc12e84e7a63a248c3f0720fdd92db6", + "url": "https://api.github.com/repos/symfony/finder/zipball/2543795ab1570df588b9bbd31e1a2bd7037b94f6", + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6", "shasum": "" }, "require": { @@ -907,7 +903,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.19" + "source": "https://github.com/symfony/finder/tree/v4.4.20" }, "funding": [ { @@ -923,11 +919,11 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-12T10:48:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -986,7 +982,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" }, "funding": [ { @@ -1006,16 +1002,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { @@ -1066,7 +1062,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" }, "funding": [ { @@ -1082,11 +1078,11 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -1145,7 +1141,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" }, "funding": [ { @@ -1165,7 +1161,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -1228,7 +1224,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" }, "funding": [ { @@ -1327,7 +1323,7 @@ }, { "name": "symfony/var-exporter", - "version": "v5.2.3", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", @@ -1380,7 +1376,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.2.3" + "source": "https://github.com/symfony/var-exporter/tree/v5.2.4" }, "funding": [ { @@ -1400,16 +1396,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9" + "reference": "29e61305e1c79d25f71060903982ead8f533e267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9", - "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/29e61305e1c79d25f71060903982ead8f533e267", + "reference": "29e61305e1c79d25f71060903982ead8f533e267", "shasum": "" }, "require": { @@ -1451,7 +1447,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v4.4.19" + "source": "https://github.com/symfony/yaml/tree/v4.4.20" }, "funding": [ { @@ -1467,20 +1463,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-22T15:36:50+00:00" }, { "name": "transip/transip-api-php", - "version": "v6.6.1", + "version": "v6.6.2", "source": { "type": "git", "url": "https://github.com/transip/transip-api-php.git", - "reference": "05317c6ef282bb19145839f53c20ffc16396af93" + "reference": "457e4c620acee5455c34b6131ce79e65db2ef162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/transip/transip-api-php/zipball/05317c6ef282bb19145839f53c20ffc16396af93", - "reference": "05317c6ef282bb19145839f53c20ffc16396af93", + "url": "https://api.github.com/repos/transip/transip-api-php/zipball/457e4c620acee5455c34b6131ce79e65db2ef162", + "reference": "457e4c620acee5455c34b6131ce79e65db2ef162", "shasum": "" }, "require": { @@ -1513,36 +1509,41 @@ "description": "TransIP Rest API Library", "support": { "issues": "https://github.com/transip/transip-api-php/issues", - "source": "https://github.com/transip/transip-api-php/tree/v6.6.1" + "source": "https://github.com/transip/transip-api-php/tree/v6.6.2" }, - "time": "2021-02-15T15:42:58+00:00" + "time": "2021-03-24T14:12:35+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1566,9 +1567,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" }, { "name": "webmozart/path-util", @@ -1768,16 +1769,16 @@ }, { "name": "doctrine/annotations", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", "shasum": "" }, "require": { @@ -1792,11 +1793,6 @@ "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -1837,9 +1833,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.11.1" + "source": "https://github.com/doctrine/annotations/tree/1.12.1" }, - "time": "2020-10-26T10:28:16+00:00" + "time": "2021-02-21T21:00:45+00:00" }, { "name": "doctrine/lexer", @@ -1923,16 +1919,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.18.2", + "version": "v2.18.4", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "18f8c9d184ba777380794a389fabc179896ba913" + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/18f8c9d184ba777380794a389fabc179896ba913", - "reference": "18f8c9d184ba777380794a389fabc179896ba913", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06f764e3cb6d60822d8f5135205f9d32b5508a31", + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31", "shasum": "" }, "require": { @@ -1994,6 +1990,7 @@ "tests/Test/IntegrationCaseFactoryInterface.php", "tests/Test/InternalIntegrationCaseFactory.php", "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", "tests/TestCase.php" ] }, @@ -2014,7 +2011,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.2" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.4" }, "funding": [ { @@ -2022,7 +2019,7 @@ "type": "github" } ], - "time": "2021-01-26T00:22:21+00:00" + "time": "2021-03-20T14:52:33+00:00" }, { "name": "php-cs-fixer/diff", @@ -2205,7 +2202,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2268,7 +2265,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.19" + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.20" }, "funding": [ { @@ -2367,7 +2364,7 @@ }, { "name": "symfony/options-resolver", - "version": "v5.2.3", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -2416,7 +2413,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.2.3" + "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" }, "funding": [ { @@ -2504,7 +2501,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -2560,7 +2557,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" }, "funding": [ { @@ -2580,7 +2577,7 @@ }, { "name": "symfony/process", - "version": "v5.2.3", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -2622,7 +2619,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.2.3" + "source": "https://github.com/symfony/process/tree/v5.2.4" }, "funding": [ { @@ -2642,7 +2639,7 @@ }, { "name": "symfony/stopwatch", - "version": "v5.2.3", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -2684,7 +2681,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.2.3" + "source": "https://github.com/symfony/stopwatch/tree/v5.2.4" }, "funding": [ { diff --git a/src/Command/Setup/Setup.php b/src/Command/Setup/Setup.php index b9dea1c..9a923d2 100644 --- a/src/Command/Setup/Setup.php +++ b/src/Command/Setup/Setup.php @@ -59,15 +59,6 @@ protected function interact(InputInterface $input, OutputInterface $output): voi $apiUseWhitelist = $helper->ask($input, $output, $whitelistQuestion); $input->setOption(Field::API_USE_WHITELIST, $apiUseWhitelist); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $apiUrl = strval($input->getOption(Field::API_URL)); - $login = strval($input->getOption(Field::API_LOGIN)); - $whitelist = boolval($input->getOption(Field::API_USE_WHITELIST)); - - $helper = $this->getHelper('question'); // Last question: What is the restapi private key? $output->writeln('Enter your RestAPI Private Key:'); @@ -85,10 +76,22 @@ protected function execute(InputInterface $input, OutputInterface $output) } } + $input->setOption(Field::API_PRIVATE_KEY, $privateKey); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $apiUrl = strval($input->getOption(Field::API_URL)); + $login = strval($input->getOption(Field::API_LOGIN)); + $whitelist = boolval($input->getOption(Field::API_USE_WHITELIST)); + $privateKey = $input->getOption(Field::API_PRIVATE_KEY); + if (strlen($privateKey) < 2) { throw new RuntimeException('Provided RestAPI key is invalid'); } + $helper = $this->getHelper('question'); + $output->writeln("Checking API connection to endpoint '{$apiUrl}'"); // Test connection to the api diff --git a/src/Settings/Settings.php b/src/Settings/Settings.php index dc593bf..c69348d 100644 --- a/src/Settings/Settings.php +++ b/src/Settings/Settings.php @@ -15,7 +15,7 @@ class Settings private const CONFIG_FILE_NAME = 'cli-config.json'; public const TRANSIP_API_ENDPOINT = 'https://api.transip.nl/v6'; - public const TRANSIP_CLI_VERSION = '6.6.1'; + public const TRANSIP_CLI_VERSION = '6.6.2'; /** * @var string