From 80efb9916dd8c1e071df486bb8359c72a17cee8c Mon Sep 17 00:00:00 2001 From: BluePsyduck Date: Wed, 19 May 2021 17:05:28 +0200 Subject: [PATCH 1/3] Upgraded the project to PHP 8. --- .github/workflows/ci.yaml | 10 +- composer.json | 2 +- composer.lock | 389 ++++++++++++++--------------------- src/Output/ProcessOutput.php | 18 +- 4 files changed, 170 insertions(+), 249 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5245d65..dc6747d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.0" extensions: ftp, gd, json, zip coverage: none @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: php-version: - - "7.4" + - "8.0" runs-on: ubuntu-latest steps: - name: Checkout @@ -95,7 +95,7 @@ jobs: fail-fast: false matrix: php-version: - - "7.4" + - "8.0" runs-on: ubuntu-latest steps: - name: Checkout @@ -135,7 +135,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.0" extensions: ftp, gd, json, zip tools: cs2pr coverage: none @@ -167,7 +167,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.0" extensions: ftp, gd, json, zip coverage: none diff --git a/composer.json b/composer.json index 05f4d00..cd034b2 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "minimum-stability": "stable", "require": { - "php": "^7.4", + "php": "^8.0", "ext-ftp": "*", "ext-gd": "*", "ext-json": "*", diff --git a/composer.lock b/composer.lock index 1e36228..8a10419 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3ff0047e8f20b7b1ce7463a44027f739", + "content-hash": "19316269cfb9c808abf1c71131c4e9a4", "packages": [ { "name": "bluepsyduck/factorio-mod-portal-client", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/BluePsyduck/factorio-mod-portal-client.git", - "reference": "dc63b04db777fd0bd19b3c8d7b8c0d8146fb0ec2" + "reference": "4e07ca2f41d9b53550c1db6f6c46f4a0d7086c0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BluePsyduck/factorio-mod-portal-client/zipball/dc63b04db777fd0bd19b3c8d7b8c0d8146fb0ec2", - "reference": "dc63b04db777fd0bd19b3c8d7b8c0d8146fb0ec2", + "url": "https://api.github.com/repos/BluePsyduck/factorio-mod-portal-client/zipball/4e07ca2f41d9b53550c1db6f6c46f4a0d7086c0e", + "reference": "4e07ca2f41d9b53550c1db6f6c46f4a0d7086c0e", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/guzzle": "^6.3", + "guzzlehttp/guzzle": "^6.3 | ^7.0", "jms/serializer": "^3.2", "php": "^7.2 | ^8.0", "psr/container": "^1.0", @@ -62,9 +62,9 @@ ], "support": { "issues": "https://github.com/BluePsyduck/factorio-mod-portal-client/issues", - "source": "https://github.com/BluePsyduck/factorio-mod-portal-client/tree/1.4.0" + "source": "https://github.com/BluePsyduck/factorio-mod-portal-client/tree/1.4.1" }, - "time": "2021-04-01T09:23:12+00:00" + "time": "2021-05-19T13:38:20+00:00" }, { "name": "bluepsyduck/factorio-translator", @@ -437,16 +437,16 @@ }, { "name": "doctrine/annotations", - "version": "1.13.0", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "03cb2123a67d4be806554fe670d0adc298199808" + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/03cb2123a67d4be806554fe670d0adc298199808", - "reference": "03cb2123a67d4be806554fe670d0adc298199808", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", "shasum": "" }, "require": { @@ -459,7 +459,7 @@ "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", "symfony/cache": "^4.4 || ^5.2" }, "type": "library", @@ -503,22 +503,22 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.0" + "source": "https://github.com/doctrine/annotations/tree/1.13.1" }, - "time": "2021-04-29T07:39:39+00:00" + "time": "2021-05-16T18:07:53+00:00" }, { "name": "doctrine/cache", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0" + "reference": "163074496dc7c3c7b8ccbf3d4376c0187424ed81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/a9c1b59eba5a08ca2770a76eddb88922f504e8e0", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0", + "url": "https://api.github.com/repos/doctrine/cache/zipball/163074496dc7c3c7b8ccbf3d4376c0187424ed81", + "reference": "163074496dc7c3c7b8ccbf3d4376c0187424ed81", "shasum": "" }, "require": { @@ -588,7 +588,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.11.0" + "source": "https://github.com/doctrine/cache/tree/1.11.1" }, "funding": [ { @@ -604,7 +604,7 @@ "type": "tidelift" } ], - "time": "2021-04-13T14:46:17+00:00" + "time": "2021-05-18T16:45:32+00:00" }, { "name": "doctrine/instantiator", @@ -757,23 +757,23 @@ }, { "name": "factorio-item-browser/combination-api-client", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/factorio-item-browser/combination-api-client.git", - "reference": "5c2df0f894506dea3ef38ccccab8403d0c05ec4b" + "reference": "e58cf4db720cdb132870ab1803d50c74b3381333" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/factorio-item-browser/combination-api-client/zipball/5c2df0f894506dea3ef38ccccab8403d0c05ec4b", - "reference": "5c2df0f894506dea3ef38ccccab8403d0c05ec4b", + "url": "https://api.github.com/repos/factorio-item-browser/combination-api-client/zipball/e58cf4db720cdb132870ab1803d50c74b3381333", + "reference": "e58cf4db720cdb132870ab1803d50c74b3381333", "shasum": "" }, "require": { "bluepsyduck/jms-serializer-factory": "^1.0", "bluepsyduck/laminas-autowire-factory": "^1.0", "ext-json": "*", - "guzzlehttp/guzzle": "^6.0", + "guzzlehttp/guzzle": "^6.0 | ^7.0", "jms/serializer": "^3.0", "php": "^7.4 | ^8.0", "symfony/yaml": "^5.0" @@ -813,9 +813,9 @@ "combination" ], "support": { - "source": "https://github.com/factorio-item-browser/combination-api-client/tree/1.0.0" + "source": "https://github.com/factorio-item-browser/combination-api-client/tree/1.0.1" }, - "time": "2021-02-16T15:14:42+00:00" + "time": "2021-05-18T13:03:20+00:00" }, { "name": "factorio-item-browser/common", @@ -933,37 +933,44 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "7008573787b430c1c1f650e3722d9bba59967628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", "psr/log": "^1.1" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -983,6 +990,11 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "Guzzle is a PHP HTTP client library", @@ -993,14 +1005,34 @@ "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/7.3.0" }, - "time": "2020-06-16T21:01:06+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2021-03-23T11:33:13+00:00" }, { "name": "guzzlehttp/promises", @@ -1772,29 +1804,33 @@ }, { "name": "paragonie/random_compat", - "version": "v9.99.99", + "version": "v2.0.20", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0f1f60250fccffeaf5dda91eea1c018aed1adc2a", + "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a", "shasum": "" }, "require": { - "php": "^7" + "php": ">=5.2.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" + "phpunit/phpunit": "4.*|5.*" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -1818,7 +1854,7 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2018-07-02T15:55:56+00:00" + "time": "2021-04-17T09:33:01+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1872,20 +1908,20 @@ }, { "name": "psr/cache", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", + "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -1905,7 +1941,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -1915,9 +1951,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "source": "https://github.com/php-fig/cache/tree/2.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-02-03T23:23:37+00:00" }, { "name": "psr/container", @@ -1967,6 +2003,58 @@ }, "time": "2021-03-05T17:36:06+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -2593,93 +2681,6 @@ ], "time": "2021-01-22T09:19:47+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", @@ -2844,82 +2845,6 @@ ], "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-php73", "version": "v1.22.1", @@ -3308,16 +3233,16 @@ }, { "name": "symfony/yaml", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "76546cbeddd0a9540b4e4e57eddeec3e9bb444a5" + "reference": "d23115e4a3d50520abddccdbec9514baab1084c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/76546cbeddd0a9540b4e4e57eddeec3e9bb444a5", - "reference": "76546cbeddd0a9540b4e4e57eddeec3e9bb444a5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d23115e4a3d50520abddccdbec9514baab1084c8", + "reference": "d23115e4a3d50520abddccdbec9514baab1084c8", "shasum": "" }, "require": { @@ -3363,7 +3288,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.2.7" + "source": "https://github.com/symfony/yaml/tree/v5.2.9" }, "funding": [ { @@ -3379,7 +3304,7 @@ "type": "tidelift" } ], - "time": "2021-04-29T20:47:09+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "webimpress/safe-writer", @@ -3941,16 +3866,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.87", + "version": "0.12.88", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d464e00776afb711f419faffa96826dc02e4d145" + "reference": "464d1a81af49409c41074aa6640ed0c4cbd9bb68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d464e00776afb711f419faffa96826dc02e4d145", - "reference": "d464e00776afb711f419faffa96826dc02e4d145", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/464d1a81af49409c41074aa6640ed0c4cbd9bb68", + "reference": "464d1a81af49409c41074aa6640ed0c4cbd9bb68", "shasum": "" }, "require": { @@ -3981,7 +3906,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.87" + "source": "https://github.com/phpstan/phpstan/tree/0.12.88" }, "funding": [ { @@ -3997,7 +3922,7 @@ "type": "tidelift" } ], - "time": "2021-05-12T15:17:52+00:00" + "time": "2021-05-17T12:24:49+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -5707,7 +5632,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4", + "php": "^8.0", "ext-ftp": "*", "ext-gd": "*", "ext-json": "*", diff --git a/src/Output/ProcessOutput.php b/src/Output/ProcessOutput.php index 8f0b8f9..18de8ba 100644 --- a/src/Output/ProcessOutput.php +++ b/src/Output/ProcessOutput.php @@ -34,17 +34,13 @@ public function addLine(string $line): self $height = min($this->terminal->getHeight() - 6, self::NUMBER_OF_LINES); $width = $this->terminal->getWidth(); - $lines = str_split($line, $width); - if ($lines !== false) { - $this->lines = array_slice(array_merge($this->lines, $lines), -$height); - - $this->output->overwrite([ - ' Process output:', - str_pad('', $width, '-'), - ...$this->lines, - str_pad('', $width, '-'), - ]); - } + $this->lines = array_slice(array_merge($this->lines, str_split($line, $width)), -$height); + $this->output->overwrite([ + ' Process output:', + str_pad('', $width, '-'), + ...$this->lines, + str_pad('', $width, '-'), + ]); return $this; } } From d30fc57b2bcfefba8b963ab53ca97ab3ada751d2 Mon Sep 17 00:00:00 2001 From: BluePsyduck Date: Wed, 19 May 2021 17:07:53 +0200 Subject: [PATCH 2/3] Updated the UUID library. --- composer.json | 2 +- composer.lock | 268 ++++++++++++++++++++++++++++++++------------------ 2 files changed, 174 insertions(+), 96 deletions(-) diff --git a/composer.json b/composer.json index cd034b2..4c88e58 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "laminas/laminas-stdlib": "^3.2", "monolog/monolog": "^2.1", "nicolab/php-ftp-client": "^1.5", - "ramsey/uuid": "^3.8", + "ramsey/uuid": "^4.0", "symfony/console": "^5.0", "symfony/filesystem": "^5.0", "symfony/process": "^5.0" diff --git a/composer.lock b/composer.lock index 8a10419..9e81ffc 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": "19316269cfb9c808abf1c71131c4e9a4", + "content-hash": "63967c6ffa7aa9ebc9d9550dae51a431", "packages": [ { "name": "bluepsyduck/factorio-mod-portal-client", @@ -356,6 +356,62 @@ }, "time": "2020-12-03T17:35:00+00:00" }, + { + "name": "brick/math", + "version": "0.9.2", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.3.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.9.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2021-01-20T22:51:39+00:00" + }, { "name": "brick/varexporter", "version": "0.3.5", @@ -1802,60 +1858,6 @@ }, "time": "2021-05-03T19:11:20+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v2.0.20", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0f1f60250fccffeaf5dda91eea1c018aed1adc2a", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2021-04-17T09:33:01+00:00" - }, { "name": "phpstan/phpdoc-parser", "version": "0.5.4", @@ -2202,55 +2204,141 @@ }, "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "ramsey/collection", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8" + }, + "require-dev": { + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", + "fakerphp/faker": "^1.5", + "hamcrest/hamcrest-php": "^2", + "jangregor/phpstan-prophecy": "^0.8", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", + "phpunit/phpunit": "^8.5 || ^9", + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.1.3" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2021-01-21T17:40:04+00:00" + }, { "name": "ramsey/uuid", - "version": "3.9.3", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" + "reference": "cd4032040a750077205918c86049aa0f43d22947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", + "reference": "cd4032040a750077205918c86049aa0f43d22947", "shasum": "" }, "require": { + "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", - "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", + "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^0.17.1", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" }, "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -2265,22 +2353,7 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", @@ -2290,10 +2363,15 @@ "support": { "issues": "https://github.com/ramsey/uuid/issues", "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid", - "wiki": "https://github.com/ramsey/uuid/wiki" + "source": "https://github.com/ramsey/uuid" }, - "time": "2020-02-21T04:36:14+00:00" + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + } + ], + "time": "2020-08-18T17:17:46+00:00" }, { "name": "symfony/console", From b388a581cbeef9bd980e0a48b9418bfb72621223 Mon Sep 17 00:00:00 2001 From: BluePsyduck Date: Mon, 24 May 2021 16:18:06 +0200 Subject: [PATCH 3/3] Updated the dependencies. --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 9e81ffc..d3ab41e 100644 --- a/composer.lock +++ b/composer.lock @@ -565,16 +565,16 @@ }, { "name": "doctrine/cache", - "version": "1.11.1", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "163074496dc7c3c7b8ccbf3d4376c0187424ed81" + "reference": "9c53086695937c50c47936ed86d96150ffbcf60d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/163074496dc7c3c7b8ccbf3d4376c0187424ed81", - "reference": "163074496dc7c3c7b8ccbf3d4376c0187424ed81", + "url": "https://api.github.com/repos/doctrine/cache/zipball/9c53086695937c50c47936ed86d96150ffbcf60d", + "reference": "9c53086695937c50c47936ed86d96150ffbcf60d", "shasum": "" }, "require": { @@ -644,7 +644,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.11.1" + "source": "https://github.com/doctrine/cache/tree/1.11.2" }, "funding": [ { @@ -660,7 +660,7 @@ "type": "tidelift" } ], - "time": "2021-05-18T16:45:32+00:00" + "time": "2021-05-20T14:57:29+00:00" }, { "name": "doctrine/instantiator",