diff --git a/cli.php b/cli.php index 969981e..63a6fe3 100644 --- a/cli.php +++ b/cli.php @@ -4,6 +4,7 @@ require __DIR__.'/vendor/autoload.php'; +use Keboola\Console\Command\ChangeProjectLimit; use Keboola\Console\Command\DeleteGoodDataProjects; use Keboola\Console\Command\MassDedup; use Keboola\Console\Command\MassProjectExtendExpiration; @@ -33,4 +34,5 @@ $application->add(new MigrateFiles()); $application->add(new MassProjectExtendExpiration()); $application->add(new DeleteGoodDataProjects()); +$application->add(new ChangeProjectLimit()); $application->run(); diff --git a/composer.json b/composer.json index 4782b04..a3b269b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "keboola/cli-utils", "require": { + "ext-json": "*", "symfony/console": "^3.1", "keboola/storage-api-client": "^11", "keboola/kbc-manage-api-php-client": "^1.14", diff --git a/composer.lock b/composer.lock index 77eb6dd..47b90bf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,27 +4,30 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6f91908716fa25bc30000af5373ea9ae", + "content-hash": "9af22d87a6c75e0162f1268fde6b23a3", "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.19.1", + "version": "3.176.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "40d7696b738c1376d5c1d1462e113c2a5648156b" + "reference": "cfd62d9d159df12e8e1fc3c486e0a010a4c39f80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/40d7696b738c1376d5c1d1462e113c2a5648156b", - "reference": "40d7696b738c1376d5c1d1462e113c2a5648156b", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cfd62d9d159df12e8e1fc3c486e0a010a4c39f80", + "reference": "cfd62d9d159df12e8e1fc3c486e0a010a4c39f80", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^5.3.1|^6.2.1", - "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.3.1", - "mtdowling/jmespath.php": "~2.2", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/promises": "^1.4.0", + "guzzlehttp/psr7": "^1.7.0", + "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, "require-dev": { @@ -33,20 +36,22 @@ "behat/behat": "~3.0", "doctrine/cache": "~1.4", "ext-dom": "*", - "ext-json": "*", "ext-openssl": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "ext-spl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", "nette/neon": "^2.3", - "phpunit/phpunit": "~4.0|~5.0", - "psr/cache": "^1.0" + "paragonie/random_compat": ">= 2", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", "doctrine/cache": "To use the DoctrineCacheAdapter", "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages" + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" }, "type": "library", "extra": { @@ -84,45 +89,55 @@ "s3", "sdk" ], - "time": "2016-08-18T22:54:26+00:00" + "support": { + "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.176.2" + }, + "time": "2021-03-26T18:16:22+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.1", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { + "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", - "php": ">=5.5" + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.5-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -146,32 +161,36 @@ "rest", "web service" ], - "time": "2016-07-15T17:22:37+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.2.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -197,36 +216,45 @@ "keywords": [ "promise" ], - "time": "2016-05-18T16:56:05+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.3.1", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -246,16 +274,28 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "psr-7", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-06-24T23:00:38+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.1" + }, + "time": "2021-03-21T16:25:00+00:00" }, { "name": "keboola/csv", @@ -286,6 +326,10 @@ ], "description": "Keboola CSV reader and writer", "homepage": "http://keboola.com", + "support": { + "issues": "https://github.com/keboola/php-csv/issues", + "source": "https://github.com/keboola/php-csv/tree/master" + }, "time": "2016-04-21T20:46:22+00:00" }, { @@ -379,20 +423,24 @@ } ], "description": "Keboola Management API Client", + "support": { + "issues": "https://github.com/keboola/kbc-manage-api-php-client/issues", + "source": "https://github.com/keboola/kbc-manage-api-php-client/tree/1.14.0" + }, "time": "2017-08-29T09:50:00+00:00" }, { "name": "keboola/storage-api-client", - "version": "11.3.0", + "version": "11.7.0", "source": { "type": "git", "url": "https://github.com/keboola/storage-api-php-client.git", - "reference": "4819a2b5538b3e58fa44155e04ac9954c98f5c76" + "reference": "6e4fc1023c3c83fc840120895edebd9a4f0a7c92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/keboola/storage-api-php-client/zipball/4819a2b5538b3e58fa44155e04ac9954c98f5c76", - "reference": "4819a2b5538b3e58fa44155e04ac9954c98f5c76", + "url": "https://api.github.com/repos/keboola/storage-api-php-client/zipball/6e4fc1023c3c83fc840120895edebd9a4f0a7c92", + "reference": "6e4fc1023c3c83fc840120895edebd9a4f0a7c92", "shasum": "" }, "require": { @@ -410,7 +458,7 @@ "brianium/paratest": "2.*", "ext-pdo_pgsql": "*", "keboola/php-csv-db-import": "^2.2", - "keboola/table-backend-utils": "^0.5", + "keboola/table-backend-utils": "^0.6", "phpcompatibility/php-compatibility": "*", "phpstan/phpstan-shim": "^0.9.2", "phpunit/phpunit": "^7.0", @@ -433,22 +481,22 @@ "homepage": "http://keboola.com", "support": { "issues": "https://github.com/keboola/storage-api-php-client/issues", - "source": "https://github.com/keboola/storage-api-php-client/tree/11.3.0" + "source": "https://github.com/keboola/storage-api-php-client/tree/11.7.0" }, - "time": "2020-11-26T17:21:52+00:00" + "time": "2021-02-05T20:11:13+00:00" }, { "name": "microsoft/azure-storage-blob", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/Azure/azure-storage-blob-php.git", - "reference": "44f9268b3510a18450c591b1155a49399edb0c9b" + "reference": "2475330963372d519387cb8135d6a9cfd42272da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/44f9268b3510a18450c591b1155a49399edb0c9b", - "reference": "44f9268b3510a18450c591b1155a49399edb0c9b", + "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/2475330963372d519387cb8135d6a9cfd42272da", + "reference": "2475330963372d519387cb8135d6a9cfd42272da", "shasum": "" }, "require": { @@ -481,26 +529,26 @@ ], "support": { "issues": "https://github.com/Azure/azure-storage-blob-php/issues", - "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.1" + "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.2" }, - "time": "2020-08-28T09:40:50+00:00" + "time": "2020-12-29T02:22:11+00:00" }, { "name": "microsoft/azure-storage-common", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/Azure/azure-storage-common-php.git", - "reference": "fe85677aa5188f8efe6916b4d6773a194e2c2ede" + "reference": "e5738035891546075bd369954e8af121d65ebd6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/fe85677aa5188f8efe6916b4d6773a194e2c2ede", - "reference": "fe85677aa5188f8efe6916b4d6773a194e2c2ede", + "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/e5738035891546075bd369954e8af121d65ebd6d", + "reference": "e5738035891546075bd369954e8af121d65ebd6d", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~6.0", + "guzzlehttp/guzzle": "~6.0|^7.0", "php": ">=5.6.0" }, "type": "library", @@ -529,29 +577,31 @@ ], "support": { "issues": "https://github.com/Azure/azure-storage-common-php/issues", - "source": "https://github.com/Azure/azure-storage-common-php/tree/master" + "source": "https://github.com/Azure/azure-storage-common-php/tree/v1.5.1" }, - "time": "2020-08-28T09:02:11+00:00" + "time": "2020-12-28T07:59:51+00:00" }, { "name": "mtdowling/jmespath.php", - "version": "2.3.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "192f93e43c2c97acde7694993ab171b3de284093" + "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/192f93e43c2c97acde7694993ab171b3de284093", - "reference": "192f93e43c2c97acde7694993ab171b3de284093", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/42dae2cbd13154083ca6d70099692fef8ca84bfb", + "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.4 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "composer/xdebug-handler": "^1.4", + "phpunit/phpunit": "^4.8.36 || ^7.5.15" }, "bin": [ "bin/jp.php" @@ -559,7 +609,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -586,7 +636,11 @@ "json", "jsonpath" ], - "time": "2016-01-05T18:25:05+00:00" + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.6.0" + }, + "time": "2020-07-31T21:01:56+00:00" }, { "name": "pear/console_commandline", @@ -650,16 +704,16 @@ }, { "name": "pear/crypt_gpg", - "version": "v1.6.4", + "version": "v1.6.5", "source": { "type": "git", "url": "https://github.com/pear/Crypt_GPG.git", - "reference": "7aa6a2a2b0017acb7eb9adf109ee4bfee0bf1d2f" + "reference": "b831a3b5e2bc77b3bf2ee27aaf121aa5b62d069a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Crypt_GPG/zipball/7aa6a2a2b0017acb7eb9adf109ee4bfee0bf1d2f", - "reference": "7aa6a2a2b0017acb7eb9adf109ee4bfee0bf1d2f", + "url": "https://api.github.com/repos/pear/Crypt_GPG/zipball/b831a3b5e2bc77b3bf2ee27aaf121aa5b62d069a", + "reference": "b831a3b5e2bc77b3bf2ee27aaf121aa5b62d069a", "shasum": "" }, "require": { @@ -716,27 +770,27 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Crypt_GPG", "source": "https://github.com/pear/Crypt_GPG" }, - "time": "2020-03-22T11:49:18+00:00" + "time": "2021-03-16T17:23:57+00:00" }, { "name": "pear/pear_exception", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7" + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", - "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", "shasum": "" }, "require": { - "php": ">=4.4.0" + "php": ">=5.2.0" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "<9" }, "type": "class", "extra": { @@ -775,7 +829,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", "source": "https://github.com/pear/PEAR_Exception" }, - "time": "2019-12-10T10:24:42+00:00" + "time": "2021-03-21T15:43:46+00:00" }, { "name": "psr/http-message", @@ -825,6 +879,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -877,40 +934,91 @@ }, "time": "2016-10-10T12:19:37+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, { "name": "symfony/console", - "version": "v3.1.3", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f9e638e8149e9e41b570ff092f8007c477ef0ce5" + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f9e638e8149e9e41b570ff092f8007c477ef0ce5", - "reference": "f9e638e8149e9e41b570ff092f8007c477ef0ce5", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -935,31 +1043,113 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-07-26T08:04:17+00:00" + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.1.3", + "name": "symfony/debug", + "version": "v4.4.20", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "bb29adceb552d202b6416ede373529338136e84f" + "url": "https://github.com/symfony/debug.git", + "reference": "157bbec4fd773bae53c5483c50951a5530a2cc16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb29adceb552d202b6416ede373529338136e84f", - "reference": "bb29adceb552d202b6416ede373529338136e84f", + "url": "https://api.github.com/repos/symfony/debug/zipball/157bbec4fd773bae53c5483c50951a5530a2cc16", + "reference": "157bbec4fd773bae53c5483c50951a5530a2cc16", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=7.1.3", + "psr/log": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.20" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } + ], + "time": "2021-01-28T16:54:48+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.4.21", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "940826c465be2690c9fae91b2793481e5cbd6834" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/940826c465be2690c9fae91b2793481e5cbd6834", + "reference": "940826c465be2690c9fae91b2793481e5cbd6834", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -982,26 +1172,293 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", - "time": "2016-07-20T05:44:26+00:00" + "support": { + "source": "https://github.com/symfony/filesystem/tree/v4.4.21" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-28T09:59:32+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1009,7 +1466,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1043,20 +1504,196 @@ "portable", "shim" ], - "time": "2016-05-18T14:26:46+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v4.4.17", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943" + "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ec1482f13d53911a8a32e54ba6f9a3b43a57d943", - "reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943", + "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a", + "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a", "shasum": "" }, "require": { @@ -1085,10 +1722,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.17" + "source": "https://github.com/symfony/process/tree/v4.4.20" }, "funding": [ { @@ -1104,22 +1741,22 @@ "type": "tidelift" } ], - "time": "2020-11-02T15:10:16+00:00" + "time": "2021-01-27T09:09:26+00:00" } ], "packages-dev": [ { "name": "squizlabs/php_codesniffer", - "version": "2.6.2", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4edb770cb853def6e60c93abb088ad5ac2010c83", - "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -1184,7 +1821,12 @@ "phpcs", "standards" ], - "time": "2016-07-13T23:29:13+00:00" + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2018-11-07T22:31:41+00:00" } ], "aliases": [], @@ -1192,7 +1834,9 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "ext-json": "*" + }, "platform-dev": [], "plugin-api-version": "2.0.0" } diff --git a/src/Keboola/Console/Command/ChangeProjectLimit.php b/src/Keboola/Console/Command/ChangeProjectLimit.php new file mode 100644 index 0000000..667c220 --- /dev/null +++ b/src/Keboola/Console/Command/ChangeProjectLimit.php @@ -0,0 +1,101 @@ + 'storage.jobsParallelism', + 'value' => 50 + ] + ]; + + protected function configure() + { + $this + ->setName('manage:change-project-limit') + ->addArgument(self::ARGUMENT_SOURCE_FILE, InputArgument::REQUIRED, 'source file') + ->addOption(self::OPTION_FORCE, 'f', InputOption::VALUE_NONE, 'Will actually do the work, otherwise it\'s dry run') + ; + } + + + protected function execute(InputInterface $input, OutputInterface $output) + { + $sourceFile = $input->getArgument(self::ARGUMENT_SOURCE_FILE); + $output->writeln(sprintf('Fetching projects from "%s"', $sourceFile)); + $force = $input->getOption(self::OPTION_FORCE); + $output->writeln($force ? 'FORCE MODE' : 'DRY RUN'); + + if ($force) { + sleep(1); + } + + $manageTokenUs = getenv('KBC_MANAGE_TOKEN_US'); + $manageTokenEu = getenv('KBC_MANAGE_TOKEN_EU'); + $manageTokenNe = getenv('KBC_MANAGE_TOKEN_NE'); + if (!($manageTokenEu && $manageTokenUs)) { + throw new \Exception('Missing token'); + } + + $clients['US'] = new Client(['token' => $manageTokenUs, 'url' => 'https://connection.keboola.com']); + $clients['EU'] = new Client(['token' => $manageTokenEu, 'url' => 'https://connection.eu-central-1.keboola.com/']); + $clients['NE'] = new Client(['token' => $manageTokenNe, 'url' => 'https://connection.north-europe.azure.keboola.com/']); + + if (!file_exists($sourceFile)) { + throw new \Exception(sprintf('Cannot open "%s"', $sourceFile)); + } + $projectsText = trim(file_get_contents($sourceFile)); + if (!$projectsText) { + return; + } + + $projects = []; + foreach (explode(PHP_EOL, $projectsText) as $projectRow) { + $project = []; + $parts = explode('-', $projectRow); + + [$project['id'], $project['region']] = $parts; + $projects[$project['id']] = $project; + } + + $output->writeln(sprintf('Found "%s" projects', count($projects))); + + foreach ($projects as $project) { + if (array_key_exists($project['region'], $clients)) { + /** @var Client $client */ + $client = $clients[$project['region']]; + try { + $projectFromApi = $client->getProject($project['id']); + } catch (\Exception $e) { + $output->writeln('Not found '.$project['id'].'-'.$project['region'].' '.$e->getMessage()); + } + if ($force) { + $client->setProjectLimits($project['id'], self::NEW_LIMITS); + $output->writeln(sprintf( + 'Updated project "%s" in "%s"', + $projectFromApi['id'], + $project['region'] + )); + } else { + $output->writeln(sprintf( + 'Would update project "%s" in "%s" with limits %s', + $projectFromApi['id'], + $project['region'], + json_encode(self::NEW_LIMITS) + )); + } + } + } + } +}