From 8c7347d44e9adaa5f9e0a34e7fb257a03a8cef5f Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Sun, 7 Feb 2021 16:28:01 +0000 Subject: [PATCH] PHP 8 update --- bin/gt | 5 +- composer.json | 2 +- composer.lock | 60 +++++++++++++----------- src/Command/AbstractWebEngineCommand.php | 22 +-------- src/Command/CreateCommand.php | 4 +- src/Command/CronCommand.php | 4 +- src/Command/ServeCommand.php | 17 +++---- 7 files changed, 48 insertions(+), 66 deletions(-) diff --git a/bin/gt b/bin/gt index 7bb8524..90d9dc7 100755 --- a/bin/gt +++ b/bin/gt @@ -2,6 +2,7 @@ run(); \ No newline at end of file +$app->run(); diff --git a/composer.json b/composer.json index 23de9a2..415d000 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ ], "require": { - "php": ">=7.4", + "php": ">=8.0", "phpgt/cli": "*", "phpgt/daemon": "*", "phpgt/cron": "*", diff --git a/composer.lock b/composer.lock index 507cd69..8ba4e2e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e30c9f7cea66470b190f9c5c2dab9cc4", + "content-hash": "3f8ebaf1629195cc26333aba32e235e2", "packages": [ { "name": "composer/semver", @@ -265,23 +265,24 @@ }, { "name": "phpgt/daemon", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/PhpGt/Daemon.git", - "reference": "03cc376ec1969530b4478f8278732eb3f97dd09e" + "reference": "6490df99a22818149f30e3af408002ea7f73e035" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/Daemon/zipball/03cc376ec1969530b4478f8278732eb3f97dd09e", - "reference": "03cc376ec1969530b4478f8278732eb3f97dd09e", + "url": "https://api.github.com/repos/PhpGt/Daemon/zipball/6490df99a22818149f30e3af408002ea7f73e035", + "reference": "6490df99a22818149f30e3af408002ea7f73e035", "shasum": "" }, "require": { "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "8.*" + "phpstan/phpstan": ">=0.12.42", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -291,7 +292,13 @@ }, "notification-url": "https://packagist.org/downloads/", "description": "Background script execution with cross-platform compatible streaming.", - "time": "2020-01-03T14:17:34+00:00" + "funding": [ + { + "url": "https://github.com/phpgt", + "type": "github" + } + ], + "time": "2021-02-02T17:33:16+00:00" }, { "name": "phpgt/server", @@ -329,16 +336,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -350,7 +357,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -401,19 +408,19 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "webmozart/assert", "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -454,31 +461,30 @@ }, { "name": "webmozart/glob", - "version": "4.0.0", + "version": "4.3.0", "source": { "type": "git", - "url": "https://github.com/webmozart/glob.git", - "reference": "732b4fc341f8dd418b0b9d8bff9b2458662cd382" + "url": "https://github.com/webmozarts/glob.git", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/glob/zipball/732b4fc341f8dd418b0b9d8bff9b2458662cd382", - "reference": "732b4fc341f8dd418b0b9d8bff9b2458662cd382", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/06358fafde0f32edb4513f4fd88fe113a40c90ee", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": "^7.3 || ^8.0.0", "webmozart/path-util": "^2.2" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.5" + "phpunit/phpunit": "^8.0", + "symfony/filesystem": "^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -497,7 +503,7 @@ } ], "description": "A PHP implementation of Ant's glob.", - "time": "2015-12-28T09:48:22+00:00" + "time": "2021-01-21T06:17:15+00:00" }, { "name": "webmozart/path-util", @@ -553,7 +559,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.0" }, "platform-dev": [], "plugin-api-version": "1.1.0" diff --git a/src/Command/AbstractWebEngineCommand.php b/src/Command/AbstractWebEngineCommand.php index ca6a2a6..e03c1c5 100644 --- a/src/Command/AbstractWebEngineCommand.php +++ b/src/Command/AbstractWebEngineCommand.php @@ -1,7 +1,6 @@ getKey(); -// -// if($key !== Argument::USER_DATA) { -// $stringArgumentArray .= "--"; -// $stringArgumentArray .= $key; -// } -// -// $value = $arg->get(); -// if(!empty($value)) { -// $stringArgumentArray .= " "; -// $stringArgumentArray .= $value; -// } -// } - -// var_dump($arguments);die(); - $processPool = new Pool(); foreach($scriptsToRun as $scriptParts) { @@ -74,4 +54,4 @@ public function executeScript( } while($processPool->numRunning() > 0); } -} \ No newline at end of file +} diff --git a/src/Command/CreateCommand.php b/src/Command/CreateCommand.php index 3789d7d..1fa70bd 100644 --- a/src/Command/CreateCommand.php +++ b/src/Command/CreateCommand.php @@ -8,7 +8,7 @@ use Gt\Cli\Stream; use Gt\Daemon\Process; -class CreateCommand extends Command { +class CreateCommand extends AbstractWebEngineCommand { public function run(ArgumentValueList $arguments = null):void { $cwd = getcwd(); $appDir = implode(DIRECTORY_SEPARATOR, [ @@ -84,4 +84,4 @@ public function getOptionalParameterList():array { public function getRequiredParameterList():array { return []; } -} \ No newline at end of file +} diff --git a/src/Command/CronCommand.php b/src/Command/CronCommand.php index 58ac456..41cff1c 100644 --- a/src/Command/CronCommand.php +++ b/src/Command/CronCommand.php @@ -2,10 +2,8 @@ namespace Gt\Installer\Command; use Gt\Cli\Argument\ArgumentValueList; -use Gt\Cli\Command\Command; use Gt\Cli\Parameter\NamedParameter; use Gt\Cli\Parameter\Parameter; -use Gt\Cli\Stream; class CronCommand extends AbstractWebEngineCommand { public function run(ArgumentValueList $arguments = null):void { @@ -44,4 +42,4 @@ public function getOptionalParameterList():array { $baseCommand = new \Gt\Cron\Command\RunCommand(); return $baseCommand->getOptionalParameterList(); } -} \ No newline at end of file +} diff --git a/src/Command/ServeCommand.php b/src/Command/ServeCommand.php index 0dad712..b2cbdee 100644 --- a/src/Command/ServeCommand.php +++ b/src/Command/ServeCommand.php @@ -1,13 +1,10 @@ getDescription(); } /** @return NamedParameter[] */ public function getRequiredNamedParameterList():array { - $baseCommand = new \Gt\Server\Command\StartCommand(); + $baseCommand = new StartCommand(); return $baseCommand->getRequiredNamedParameterList(); } /** @return NamedParameter[] */ public function getOptionalNamedParameterList():array { - $baseCommand = new \Gt\Server\Command\StartCommand(); + $baseCommand = new StartCommand(); return $baseCommand->getOptionalNamedParameterList(); } /** @return Parameter[] */ public function getRequiredParameterList():array { - $baseCommand = new \Gt\Server\Command\StartCommand(); + $baseCommand = new StartCommand(); return $baseCommand->getRequiredParameterList(); } /** @return Parameter[] */ public function getOptionalParameterList():array { - $baseCommand = new \Gt\Server\Command\StartCommand(); + $baseCommand = new StartCommand(); return $baseCommand->getOptionalParameterList(); } -} \ No newline at end of file +}