Split progressbar output into two windows.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Jens True 2023-08-31 13:15:06 +00:00
parent 37049ba6f4
commit 7ab7998ac7
3 changed files with 40 additions and 27 deletions

@ -11,4 +11,7 @@ sudo dpkg -i rclone-current-linux-amd64.deb
# PHP Docs # PHP Docs
wget https://phpdoc.org/phpDocumentor.phar wget https://phpdoc.org/phpDocumentor.phar
chmod +x phpDocumentor.phar chmod +x phpDocumentor.phar
./phpDocumentor.phar ./phpDocumentor.phar
# Test, analyze, metrics, document
./composer.phar test-coverage && ./composer.phar analyze && ./composer.phar metrics && ./composer.phar doc

52
composer.lock generated

@ -2198,16 +2198,16 @@
}, },
{ {
"name": "composer/semver", "name": "composer/semver",
"version": "3.3.2", "version": "3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/semver.git", "url": "https://github.com/composer/semver.git",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2257,9 +2257,9 @@
"versioning" "versioning"
], ],
"support": { "support": {
"irc": "irc://irc.freenode.org/composer", "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues", "issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.3.2" "source": "https://github.com/composer/semver/tree/3.4.0"
}, },
"funding": [ "funding": [
{ {
@ -2275,7 +2275,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-04-01T19:23:25+00:00" "time": "2023-08-31T09:50:34+00:00"
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
@ -3437,16 +3437,16 @@
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
"version": "4.0.2", "version": "4.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "5647d65443818959172645e7ed999217360654b6" "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c",
"reference": "5647d65443818959172645e7ed999217360654b6", "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3486,7 +3486,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2" "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0"
}, },
"funding": [ "funding": [
{ {
@ -3494,7 +3494,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-05-07T09:13:23+00:00" "time": "2023-08-31T06:24:48+00:00"
}, },
{ {
"name": "phpunit/php-invoker", "name": "phpunit/php-invoker",
@ -4024,16 +4024,16 @@
}, },
{ {
"name": "sebastian/complexity", "name": "sebastian/complexity",
"version": "3.0.0", "version": "3.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git", "url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c70b73893e10757af9c6a48929fa6a333b56a97a",
"reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4069,7 +4069,8 @@
"homepage": "https://github.com/sebastianbergmann/complexity", "homepage": "https://github.com/sebastianbergmann/complexity",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues", "issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" "security": "https://github.com/sebastianbergmann/complexity/security/policy",
"source": "https://github.com/sebastianbergmann/complexity/tree/3.0.1"
}, },
"funding": [ "funding": [
{ {
@ -4077,7 +4078,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-02-03T06:59:47+00:00" "time": "2023-08-31T09:55:53+00:00"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
@ -4351,16 +4352,16 @@
}, },
{ {
"name": "sebastian/lines-of-code", "name": "sebastian/lines-of-code",
"version": "2.0.0", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git", "url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d",
"reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4396,7 +4397,8 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code", "homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1"
}, },
"funding": [ "funding": [
{ {
@ -4404,7 +4406,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-02-03T07:08:02+00:00" "time": "2023-08-31T09:25:50+00:00"
}, },
{ {
"name": "sebastian/object-enumerator", "name": "sebastian/object-enumerator",

@ -9,6 +9,7 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use App\Template\Twig; use App\Template\Twig;
use App\Notification\Notification; use App\Notification\Notification;
@ -45,6 +46,13 @@ class CommandBackup extends Command
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
$sio = new SymfonyStyle($input, $output); $sio = new SymfonyStyle($input, $output);
$sioProgressbar = &$sio;
if ($output instanceof ConsoleOutputInterface) {
$sio = new SymfonyStyle($input, $output->section());
$sioProgressbar = new SymfonyStyle($input, $output->section());
}
$sio->title('Start backup process'); $sio->title('Start backup process');
try { try {
@ -68,7 +76,7 @@ class CommandBackup extends Command
/** @var array{title: string, source: string, destination: string}[] */ /** @var array{title: string, source: string, destination: string}[] */
$backupElements = $app->getConfig('backup'); $backupElements = $app->getConfig('backup');
/** @var array{title: string, source: string, destination: string} $conf */ /** @var array{title: string, source: string, destination: string} $conf */
foreach ($sio->progressIterate($backupElements) as $conf) { foreach ($sioProgressbar->progressIterate($backupElements) as $conf) {
$title = $conf['title']; $title = $conf['title'];
$template = array(); $template = array();
$template['config'] = $conf; $template['config'] = $conf;