From 4dc4f4197723cfb9ab9611f70a2af6d46fa0646f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:44:25 +0100 Subject: [PATCH 01/21] build(deps): bump crazy-max/ghaction-import-gpg from 5 to 6 in /.github/workflows (#1173) build(deps): bump crazy-max/ghaction-import-gpg in /.github/workflows Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 5 to 6. - [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases) - [Commits](https://github.com/crazy-max/ghaction-import-gpg/compare/v5...v6) --- updated-dependencies: - dependency-name: crazy-max/ghaction-import-gpg dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c8e225f64..2b720392d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,7 +56,7 @@ jobs: - name: Import GPG key if: github.event_name == 'release' - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_KEY_41539BBD4020945DB378F98B2DF45277AEF09A2F }} passphrase: ${{ secrets.GPG_KEY_41539BBD4020945DB378F98B2DF45277AEF09A2F_PASSPHRASE }} From 62adcc34b16ea6173a82b9e31046e2dff1d02647 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:44:39 +0100 Subject: [PATCH 02/21] build(deps): bump docker/setup-buildx-action from 2 to 3 in /.github/workflows (#1172) build(deps): bump docker/setup-buildx-action in /.github/workflows Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index ef7e66835..ea40dd87f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -49,7 +49,7 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b720392d..fd6218050 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -144,7 +144,7 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Container Registry if: github.event_name == 'release' From 0231b1964d7664765a660c7a4b697a7a40d13c93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:45:15 +0100 Subject: [PATCH 03/21] build(deps): bump docker/setup-qemu-action from 2 to 3 in /.github/workflows (#1171) build(deps): bump docker/setup-qemu-action in /.github/workflows Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index ea40dd87f..eef132ca9 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fd6218050..0072bb994 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -141,7 +141,7 @@ jobs: ./bin/box.phar --ansi --version - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 45e9ae9a451f2e2a351e2726cf5d00fae3939f5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:45:32 +0100 Subject: [PATCH 04/21] build(deps): bump actions/setup-python from 3 to 4 in /.github/workflows (#1170) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/gh-pages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 556c50d1e..f97d6348d 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.8' From d4a68106c3dcd56ac6ffae653e914b149c2a1cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:00:15 +0100 Subject: [PATCH 05/21] chore: Upgrade to PHP 8.2 (#1175) --- .docker/Dockerfile | 2 +- .docker/build | 8 ++--- .docker/{php81 => php82} | 2 +- .../{php81_build_phar => php82_build_phar} | 4 +-- .docker/{php81_xdebug => php82_xdebug} | 2 +- .github/dependabot.yml | 4 +++ .github/workflows/auto-review.yaml | 8 ++--- .github/workflows/docker.yaml | 12 ++++---- .github/workflows/e2e-tests.yaml | 8 ++--- .github/workflows/release.yaml | 7 ++++- .github/workflows/requirement-checker.yaml | 29 +++++++++---------- .github/workflows/unit-tests.yaml | 17 +++++------ .php-cs-fixer.dist.php | 2 +- Makefile.e2e | 4 +-- composer.json | 6 ++-- composer.lock | 6 ++-- requirement-checker/Makefile.e2e | 2 +- 17 files changed, 63 insertions(+), 60 deletions(-) rename .docker/{php81 => php82} (91%) rename .docker/{php81_build_phar => php82_build_phar} (85%) rename .docker/{php81_xdebug => php82_xdebug} (93%) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 9cc0c500b..1e772c5f3 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-cli-alpine +FROM php:8.2-cli-alpine COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ RUN install-php-extensions zlib phar sodium tokenizer filter diff --git a/.docker/build b/.docker/build index 42baf9770..1a5b84ae8 100755 --- a/.docker/build +++ b/.docker/build @@ -8,10 +8,10 @@ if [[ "$(docker images -q ghcr.io/box-project/box_php725 2> /dev/null)" == "" ]] docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php725 --file "${SCRIPT_DIR}/php725" . fi -if [[ "$(docker images -q ghcr.io/box-project/box_php81 2> /dev/null)" == "" ]]; then - docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php81 --file "${SCRIPT_DIR}/php81" . +if [[ "$(docker images -q ghcr.io/box-project/box_php82 2> /dev/null)" == "" ]]; then + docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82 --file "${SCRIPT_DIR}/php82" . fi -if [[ "$(docker images -q ghcr.io/box-project/box_php81_xdebug 2> /dev/null)" == "" ]]; then - docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php81_xdebug --file "${SCRIPT_DIR}/php81_xdebug" . +if [[ "$(docker images -q ghcr.io/box-project/box_php82_xdebug 2> /dev/null)" == "" ]]; then + docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82_xdebug --file "${SCRIPT_DIR}/php82_xdebug" . fi diff --git a/.docker/php81 b/.docker/php82 similarity index 91% rename from .docker/php81 rename to .docker/php82 index 7b18378f6..5e9d61ec3 100644 --- a/.docker/php81 +++ b/.docker/php82 @@ -1,4 +1,4 @@ -FROM php:8.1-cli +FROM php:8.2-cli RUN echo '' | \ apt-get -y update; \ diff --git a/.docker/php81_build_phar b/.docker/php82_build_phar similarity index 85% rename from .docker/php81_build_phar rename to .docker/php82_build_phar index a07175968..e5cd65ee1 100644 --- a/.docker/php81_build_phar +++ b/.docker/php82_build_phar @@ -1,4 +1,4 @@ -FROM php:8.1-cli-alpine as build-stage +FROM php:8.2-cli-alpine as build-stage RUN apk add --update make git @@ -10,7 +10,7 @@ ADD . /opt/box-project/box RUN cd /opt/box-project/box && \ make compile -FROM php:8.1-cli-alpine +FROM php:8.2-cli-alpine COPY --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box diff --git a/.docker/php81_xdebug b/.docker/php82_xdebug similarity index 93% rename from .docker/php81_xdebug rename to .docker/php82_xdebug index 5290e3aca..ca34eab1b 100644 --- a/.docker/php81_xdebug +++ b/.docker/php82_xdebug @@ -1,4 +1,4 @@ -FROM php:8.1-cli +FROM php:8.2-cli RUN echo '' | \ apt-get -y update; \ diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ee9d84b59..685fcb7e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,3 +13,7 @@ updates: directory: ".github/workflows" schedule: interval: "weekly" + groups: + dependencies: + patterns: + - "*" diff --git a/.github/workflows/auto-review.yaml b/.github/workflows/auto-review.yaml index 13618bd0d..1ee4494b7 100644 --- a/.github/workflows/auto-review.yaml +++ b/.github/workflows/auto-review.yaml @@ -27,7 +27,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -57,7 +57,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -73,7 +73,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -95,7 +95,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index eef132ca9..c9ceeddd4 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -35,12 +35,12 @@ jobs: - name: PHP 7.2.5 docker-file: .docker/php725 image-tag: ghcr.io/box-project/box_php725 - - name: PHP 8.1 - docker-file: .docker/php81 - image-tag: ghcr.io/box-project/box_php81 - - name: PHP 8.1 (Xdebug) - docker-file: .docker/php81_xdebug - image-tag: ghcr.io/box-project/box_php81_xdebug + - name: PHP 8.2 + docker-file: .docker/php82 + image-tag: ghcr.io/box-project/box_php82 + - name: PHP 8.2 (Xdebug) + docker-file: .docker/php82_xdebug + image-tag: ghcr.io/box-project/box_php82_xdebug steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index 9d2cad848..616a8e982 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -67,7 +67,7 @@ jobs: - e2e_dockerfile_no_extension - e2e_custom_composer_bin - e2e_reproducible_build - php: [ '8.1', '8.2', '8.3' ] + php: [ '8.2', '8.3' ] tools: - 'composer:2.2' - 'composer:2.3' @@ -141,7 +141,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' ini-values: phar.readonly=0, display_errors=On, error_reporting=-1 tools: composer coverage: pcov @@ -181,8 +181,8 @@ jobs: - name: Pull the docker image run: | - docker pull ghcr.io/box-project/box_php81 - docker pull ghcr.io/box-project/box_php81_xdebug + docker pull ghcr.io/box-project/box_php82 + docker pull ghcr.io/box-project/box_php82_xdebug - run: make ${{ matrix.e2e }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0072bb994..43ecec93a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,7 +33,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' ini-values: phar.readonly=0 tools: composer coverage: none @@ -127,6 +127,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + - uses: actions/download-artifact@v3 with: name: box-phar diff --git a/.github/workflows/requirement-checker.yaml b/.github/workflows/requirement-checker.yaml index 8d8695599..718b1fc9f 100644 --- a/.github/workflows/requirement-checker.yaml +++ b/.github/workflows/requirement-checker.yaml @@ -30,7 +30,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -69,7 +69,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -93,19 +93,16 @@ jobs: # The lowest dependency is tested via an e2e test rather than by executing the tests like so. # The reason being using tools such as PHPUnit for a version as low as the lowest supported version # is a serious strain for close to no benefits: the e2e test is simpler. - php: [ '8.1' ] + php: [ '8.2' ] dependency: [ locked ] - composer-options: [ null ] + composer-options: [ '' ] include: - - php: '8.1' + - php: '8.2' dependency: lowest - composer-options: ~ - - php: '8.1' - dependency: highest - composer-options: ~ + composer-options: '' - php: '8.2' dependency: highest - composer-options: ~ + composer-options: '' - php: '8.3' dependency: highest composer-options: --ignore-platform-req=php+ @@ -192,21 +189,21 @@ jobs: - command: _test_e2e_pass_no_config_min_composer_php docker-image: ghcr.io/box-project/box_php725 - command: _test_e2e_pass_no_config_min_box_php - docker-image: ghcr.io/box-project/box_php81 + docker-image: ghcr.io/box-project/box_php82 - command: _test_e2e_pass_complete_min_composer_php docker-image: ghcr.io/box-project/box_php725 - command: _test_e2e_pass_complete_min_box_php - docker-image: ghcr.io/box-project/box_php81 + docker-image: ghcr.io/box-project/box_php82 - command: _test_e2e_fail_complete_min_composer_php docker-image: ghcr.io/box-project/box_php725 - command: _test_e2e_fail_complete_min_box_php - docker-image: ghcr.io/box-project/box_php81 + docker-image: ghcr.io/box-project/box_php82 - command: _test_e2e_skip_min_composer_php docker-image: ghcr.io/box-project/box_php725 - command: _test_e2e_pass_complete_requirement_checker_not_disabled docker-image: ghcr.io/box-project/box_php725 - command: _test_e2e_fail_conflict - docker-image: ghcr.io/box-project/box_php81 + docker-image: ghcr.io/box-project/box_php82 steps: - name: Checkout uses: actions/checkout@v4 @@ -214,7 +211,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none @@ -293,7 +290,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: composer coverage: none diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 6d3c6f46a..a99cd4a4c 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -26,18 +26,15 @@ jobs: fail-fast: false matrix: php: - - version: '8.1' + - version: '8.2' dependency: locked - composer-options: ~ - - version: '8.1' + composer-options: '' + - version: '8.2' dependency: lowest - composer-options: ~ - - version: '8.1' - dependency: highest - composer-options: ~ + composer-options: '' - version: '8.2' dependency: highest - composer-options: ~ + composer-options: '' - version: '8.3' dependency: highest composer-options: --ignore-platform-req=php+ @@ -52,7 +49,7 @@ jobs: include: - label: '; bz2 disabled' php: - version: '8.1' + version: '8.2' dependency: locked composer-options: '' tools: composer @@ -94,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '8.1' ] + php: [ '8.2' ] if: github.event_name == 'pull_request' || github.event_name == 'push' steps: - name: Checkout diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 76dc9efee..fd60101c2 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -32,7 +32,7 @@ ], ]; -$config = new FidryConfig('', 81_000); +$config = new FidryConfig('', 82_000); $config->addRules($overriddenRules); $config->setCacheFile(__DIR__.'/dist/.php-cs-fixer.cache'); $config->setFinder($finder); diff --git a/Makefile.e2e b/Makefile.e2e index 717aeb066..c2e0a1955 100644 --- a/Makefile.e2e +++ b/Makefile.e2e @@ -5,8 +5,8 @@ MAKEFLAGS += --no-builtin-rules DOCKER_RUN = docker run --interactive --platform=linux/amd64 --rm --workdir=/opt/box DOCKER_RUN_NO_PULL = docker run --interactive --platform=linux/amd64 --rm --pull=never # Matches the minimum PHP version supported by Box. -DOCKER_MIN_BOX_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php81 -DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php81_xdebug +DOCKER_MIN_BOX_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82 +DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82_xdebug E2E_SCOPER_EXPOSE_SYMBOLS_DIR = fixtures/build/dir011 E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR = dist/dir011 diff --git a/composer.json b/composer.json index 2869ae685..409142ebb 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-iconv": "*", "ext-mbstring": "*", "ext-phar": "*", @@ -25,7 +25,7 @@ "amphp/parallel-functions": "^1.1", "composer/semver": "^3.3.2", "composer/xdebug-handler": "^3.0.3", - "fidry/console": "^0.5.3 || ^0.6.0", + "fidry/console": "^0.5.3", "fidry/filesystem": "^1.1", "humbug/php-scoper": "^0.18.6", "justinrainbow/json-schema": "^5.2.12", @@ -99,7 +99,7 @@ "ergebnis/composer-normalize": true }, "platform": { - "php": "8.1" + "php": "8.2" }, "platform-check": false, "sort-packages": true diff --git a/composer.lock b/composer.lock index 8dfbffedc..cf6a76582 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": "2ca942294db7c323405284645f0aca57", + "content-hash": "6dcfacaa1241091eca2295cd36eb29f3", "packages": [ { "name": "amphp/amp", @@ -5755,7 +5755,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1", + "php": "^8.2", "ext-iconv": "*", "ext-mbstring": "*", "ext-phar": "*", @@ -5763,7 +5763,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "8.1" + "php": "8.2" }, "plugin-api-version": "2.6.0" } diff --git a/requirement-checker/Makefile.e2e b/requirement-checker/Makefile.e2e index e95f6e48c..8e11e89c0 100644 --- a/requirement-checker/Makefile.e2e +++ b/requirement-checker/Makefile.e2e @@ -14,7 +14,7 @@ DOCKER_MIN_COMPOSER_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php725 DOCKER_MIN_COMPOSER_PHP_VERSION_RUN_COMMAND = $(DOCKER_MIN_COMPOSER_PHP_VERSION_IMAGE_TAG) php index.phar -vvv --no-ansi # Matches the minimum PHP version supported by Box. -DOCKER_MIN_BOX_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php81 +DOCKER_MIN_BOX_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82 DOCKER_MIN_BOX_PHP_VERSION_RUN_COMMAND = $(DOCKER_MIN_BOX_PHP_VERSION_IMAGE_TAG) php index.phar -vvv --no-ansi E2E_TEST_PASS_NO_CONFIG_DIR := fixtures/pass-no-config From dd3029666b655814975717ae0b9644849d2201a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:25:32 +0100 Subject: [PATCH 06/21] build(deps): bump the dependencies group with 1 update (#1176) Bumps the dependencies group with 1 update: [laravel/serializable-closure](https://github.com/laravel/serializable-closure). - [Release notes](https://github.com/laravel/serializable-closure/releases) - [Changelog](https://github.com/laravel/serializable-closure/blob/master/CHANGELOG.md) - [Commits](https://github.com/laravel/serializable-closure/compare/v1.3.2...v1.3.3) --- updated-dependencies: - dependency-name: laravel/serializable-closure dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index cf6a76582..e4c3c8ec2 100644 --- a/composer.lock +++ b/composer.lock @@ -1178,16 +1178,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.2", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c" + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c", - "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", "shasum": "" }, "require": { @@ -1234,7 +1234,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-10-17T13:38:16+00:00" + "time": "2023-11-08T14:08:06+00:00" }, { "name": "nikic/iter", From fed7da1cdbd221eb7bd1493f1e670e87043e4b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:33:54 +0100 Subject: [PATCH 07/21] chore: Upgrade to FidryConsole 0.6 (#1174) --- bin/box | 2 +- composer.json | 3 +- composer.lock | 101 +++++++++--------- .../Command/TestConfigurableCommand.php | 2 +- src/Composer/ComposerOrchestrator.php | 2 +- src/Composer/ComposerProcessFactory.php | 2 +- .../Command/ChangeWorkingDirOption.php | 4 +- src/Console/Command/Compile.php | 19 ++-- .../Command/Composer/ComposerCheckVersion.php | 2 +- .../Command/Composer/ComposerCommand.php | 4 +- .../Command/Composer/ComposerVendorDir.php | 2 +- src/Console/Command/ConfigOption.php | 2 +- src/Console/Command/Diff.php | 18 ++-- src/Console/Command/Extract.php | 10 +- src/Console/Command/GenerateDockerFile.php | 5 +- src/Console/Command/Info.php | 11 +- src/Console/Command/Namespace_.php | 2 +- src/Console/Command/Process.php | 8 +- src/Console/Command/Validate.php | 6 +- src/Console/Command/Verify.php | 4 +- src/Console/ConfigurationLoader.php | 2 +- src/Console/Logger/CompilerLogger.php | 2 +- src/Console/MessageRenderer.php | 4 +- src/Console/OutputFormatterConfigurator.php | 2 +- src/Console/PharInfoRenderer.php | 2 +- src/DockerFileGenerator.php | 1 + src/Phar/Differ/ChecksumDiffer.php | 2 +- src/Phar/Differ/Differ.php | 2 +- src/Phar/Differ/FilenameDiffer.php | 4 +- src/Phar/Differ/GitDiffer.php | 2 +- src/Phar/Differ/ProcessCommandBasedDiffer.php | 2 +- src/Phar/PharDiff.php | 2 +- src/Test/CommandTestCase.php | 2 +- src/functions.php | 2 +- tests/Console/Command/CompileTest.php | 2 +- 35 files changed, 125 insertions(+), 117 deletions(-) diff --git a/bin/box b/bin/box index f8ac45bc7..98d6c6c43 100755 --- a/bin/box +++ b/bin/box @@ -16,7 +16,7 @@ declare(strict_types=1); namespace KevinGH\Box; use Fidry\Console\Application\ApplicationRunner; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\Application; use KevinGH\Box\Console\OutputFormatterConfigurator; use RuntimeException; diff --git a/composer.json b/composer.json index 409142ebb..d949a74c9 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "amphp/parallel-functions": "^1.1", "composer/semver": "^3.3.2", "composer/xdebug-handler": "^3.0.3", - "fidry/console": "^0.5.3", + "fidry/console": "^0.6.0", "fidry/filesystem": "^1.1", "humbug/php-scoper": "^0.18.6", "justinrainbow/json-schema": "^5.2.12", @@ -38,7 +38,6 @@ "sebastian/diff": "^4.0", "seld/jsonlint": "^1.9", "seld/phar-utils": "^1.2", - "symfony/console": "^6.1.7", "symfony/filesystem": "^6.1.5", "symfony/finder": "^6.1.3", "symfony/polyfill-iconv": "^1.28", diff --git a/composer.lock b/composer.lock index e4c3c8ec2..d706d03f7 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": "6dcfacaa1241091eca2295cd36eb29f3", + "content-hash": "3cba203db0b518d2e4a789aca01b9887", "packages": [ { "name": "amphp/amp", @@ -824,44 +824,45 @@ }, { "name": "fidry/console", - "version": "0.5.5", + "version": "0.6.8", "source": { "type": "git", "url": "https://github.com/theofidry/console.git", - "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7" + "reference": "f77b0abe54fd6fea6ce8733c98817d82c07b6b8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/console/zipball/bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", - "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", + "url": "https://api.github.com/repos/theofidry/console/zipball/f77b0abe54fd6fea6ce8733c98817d82c07b6b8e", + "reference": "f77b0abe54fd6fea6ce8733c98817d82c07b6b8e", "shasum": "" }, "require": { - "php": "^7.4.0 || ^8.0.0", - "symfony/console": "^4.4 || ^5.4 || ^6.1", - "symfony/event-dispatcher-contracts": "^1.0 || ^2.5 || ^3.0", - "symfony/service-contracts": "^1.0 || ^2.5 || ^3.0", - "thecodingmachine/safe": "^1.3 || ^2.0", + "php": "^8.2", + "psr/log": "^3.0", + "symfony/console": "^6.3", + "symfony/event-dispatcher-contracts": "^2.5 || ^3.0", + "symfony/service-contracts": "^2.5 || ^3.0", + "thecodingmachine/safe": "^2.0", "webmozart/assert": "^1.11" }, "conflict": { - "symfony/dependency-injection": "<5.3.0", - "symfony/framework-bundle": "<5.3.0", - "symfony/http-kernel": "<5.3.0" + "symfony/dependency-injection": "<6.3.0", + "symfony/framework-bundle": "<6.3.0", + "symfony/http-kernel": "<6.3.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4", - "composer/semver": "^3.3", - "ergebnis/composer-normalize": "^2.28", - "infection/infection": "^0.26", + "bamarni/composer-bin-plugin": "^1.8.2", + "composer/semver": "^3.3.2", + "ergebnis/composer-normalize": "^2.33", + "fidry/makefile": "^0.2.1 || ^1.0.0", + "infection/infection": "^0.27", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.4.3", - "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.1", - "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.1", - "symfony/http-kernel": "^4.4 || ^5.4 || ^6.1", - "symfony/phpunit-bridge": "^4.4.47 || ^5.4 || ^6.0", - "symfony/yaml": "^4.4 || ^5.4 || ^6.1", - "webmozarts/strict-phpunit": "^7.3" + "phpunit/phpunit": "^10.2", + "symfony/dependency-injection": "^6.3", + "symfony/flex": "^2.4.0", + "symfony/framework-bundle": "^6.3", + "symfony/http-kernel": "^6.3", + "symfony/yaml": "^6.3" }, "type": "library", "extra": { @@ -896,7 +897,7 @@ ], "support": { "issues": "https://github.com/theofidry/console/issues", - "source": "https://github.com/theofidry/console/tree/0.5.5" + "source": "https://github.com/theofidry/console/tree/0.6.8" }, "funding": [ { @@ -904,7 +905,7 @@ "type": "github" } ], - "time": "2022-12-18T10:49:34+00:00" + "time": "2023-11-18T22:57:23+00:00" }, { "name": "fidry/filesystem", @@ -977,24 +978,24 @@ }, { "name": "humbug/php-scoper", - "version": "0.18.7", + "version": "0.18.8", "source": { "type": "git", "url": "https://github.com/humbug/php-scoper.git", - "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858" + "reference": "eba4b11624c6064550d06b4ecd776fc61f969ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/9386a0af946f175d7a1ebfb68851bc2bb8ad7858", - "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/eba4b11624c6064550d06b4ecd776fc61f969ad8", + "reference": "eba4b11624c6064550d06b4ecd776fc61f969ad8", "shasum": "" }, "require": { - "fidry/console": "^0.5.0", + "fidry/console": "^0.6.6", "fidry/filesystem": "^1.1", "jetbrains/phpstorm-stubs": "^v2022.2", "nikic/php-parser": "^4.12", - "php": "^8.1", + "php": "^8.2", "symfony/console": "^5.2 || ^6.0", "symfony/filesystem": "^5.2 || ^6.0", "symfony/finder": "^5.2 || ^6.0", @@ -1054,9 +1055,9 @@ "description": "Prefixes all PHP namespaces in a file or directory.", "support": { "issues": "https://github.com/humbug/php-scoper/issues", - "source": "https://github.com/humbug/php-scoper/tree/0.18.7" + "source": "https://github.com/humbug/php-scoper/tree/0.18.8" }, - "time": "2023-11-04T18:01:12+00:00" + "time": "2023-11-18T23:13:18+00:00" }, { "name": "jetbrains/phpstorm-stubs", @@ -1514,16 +1515,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.2", + "version": "1.24.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bcad8d995980440892759db0c32acae7c8e79442" + "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", - "reference": "bcad8d995980440892759db0c32acae7c8e79442", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083", + "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083", "shasum": "" }, "require": { @@ -1555,9 +1556,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.3" }, - "time": "2023-09-26T12:28:12+00:00" + "time": "2023-11-18T20:15:32+00:00" }, { "name": "psr/container", @@ -1982,7 +1983,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -2029,7 +2030,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -2049,7 +2050,7 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -2105,7 +2106,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" }, "funding": [ { @@ -2726,16 +2727,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { @@ -2788,7 +2789,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -2804,7 +2805,7 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/string", diff --git a/fixtures/Console/Command/TestConfigurableCommand.php b/fixtures/Console/Command/TestConfigurableCommand.php index c69a02365..e3fcc1553 100644 --- a/fixtures/Console/Command/TestConfigurableCommand.php +++ b/fixtures/Console/Command/TestConfigurableCommand.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Configuration\Configuration as BoxConfiguration; class TestConfigurableCommand implements Command diff --git a/src/Composer/ComposerOrchestrator.php b/src/Composer/ComposerOrchestrator.php index db259dd7c..02c7f74ed 100644 --- a/src/Composer/ComposerOrchestrator.php +++ b/src/Composer/ComposerOrchestrator.php @@ -15,7 +15,7 @@ namespace KevinGH\Box\Composer; use Composer\Semver\Semver; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FileSystem; use Humbug\PhpScoper\Symbol\SymbolsRegistry; use KevinGH\Box\NotInstantiable; diff --git a/src/Composer/ComposerProcessFactory.php b/src/Composer/ComposerProcessFactory.php index ae19cc9a0..1cfbb8878 100644 --- a/src/Composer/ComposerProcessFactory.php +++ b/src/Composer/ComposerProcessFactory.php @@ -15,7 +15,7 @@ namespace KevinGH\Box\Composer; use Closure; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use RuntimeException; use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\Process; diff --git a/src/Console/Command/ChangeWorkingDirOption.php b/src/Console/Command/ChangeWorkingDirOption.php index 9290928dd..ac676582a 100644 --- a/src/Console/Command/ChangeWorkingDirOption.php +++ b/src/Console/Command/ChangeWorkingDirOption.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console\Command; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Input\InputOption; use Webmozart\Assert\Assert; @@ -43,7 +43,7 @@ public static function getOptionInput(): InputOption public static function changeWorkingDirectory(IO $io): void { - $workingDir = $io->getOption(self::WORKING_DIR_OPT)->asNullableNonEmptyString(); + $workingDir = $io->getTypedOption(self::WORKING_DIR_OPT)->asNullableNonEmptyString(); if (null === $workingDir) { return; diff --git a/src/Console/Command/Compile.php b/src/Console/Command/Compile.php index 6fdf18e70..8d5f3c208 100644 --- a/src/Console/Command/Compile.php +++ b/src/Console/Command/Compile.php @@ -22,7 +22,7 @@ use Fidry\Console\Command\CommandAwareness; use Fidry\Console\Command\Configuration as CommandConfiguration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FileSystem; use Fidry\FileSystem\FS; use Humbug\PhpScoper\Symbol\SymbolsRegistry; @@ -180,11 +180,11 @@ public function getConfiguration(): CommandConfiguration public function execute(IO $io): int { - if ($io->getOption(self::NO_RESTART_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::NO_RESTART_OPTION)->asBoolean()) { putenv(BOX_ALLOW_XDEBUG.'=1'); } - $debug = $io->getOption(self::DEBUG_OPTION)->asBoolean(); + $debug = $io->getTypedOption(self::DEBUG_OPTION)->asBoolean(); if ($debug) { $io->setVerbosity(OutputInterface::VERBOSITY_DEBUG); @@ -192,7 +192,7 @@ public function execute(IO $io): int check_php_settings($io); - if ($io->getOption(self::NO_PARALLEL_PROCESSING_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::NO_PARALLEL_PROCESSING_OPTION)->asBoolean()) { disable_parallel_processing(); $io->writeln( '[debug] Disabled parallel processing', @@ -204,7 +204,7 @@ public function execute(IO $io): int $io->writeln($this->header); - $config = $io->getOption(self::NO_CONFIG_OPTION)->asBoolean() + $config = $io->getTypedOption(self::NO_CONFIG_OPTION)->asBoolean() ? Configuration::create(null, new stdClass()) : ConfigOption::getConfig($io, true); $config->setComposerBin(self::getComposerBin($io)); @@ -233,7 +233,7 @@ public function execute(IO $io): int self::logEndBuilding($config, $logger, $io, $box, $path, $startTime); - if ($io->getOption(self::WITH_DOCKER_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::WITH_DOCKER_OPTION)->asBoolean()) { return $this->generateDockerFile($io); } @@ -287,7 +287,7 @@ private function createPhar( self::configureCompressionAlgorithm( $config, $box, - $io->getOption(self::DEV_OPTION)->asBoolean(), + $io->getTypedOption(self::DEV_OPTION)->asBoolean(), $io, $logger, ); @@ -303,7 +303,7 @@ private function createPhar( private static function getComposerBin(IO $io): ?string { - $composerBin = $io->getOption(self::COMPOSER_BIN_OPTION)->asNullableNonEmptyString(); + $composerBin = $io->getTypedOption(self::COMPOSER_BIN_OPTION)->asNullableNonEmptyString(); return null === $composerBin ? null : Path::makeAbsolute($composerBin, getcwd()); } @@ -364,7 +364,7 @@ private static function checkComposerVersion( 'Supported version detected', ); } catch (IncompatibleComposerVersion $incompatibleComposerVersion) { - if ($io->getOption(self::ALLOW_COMPOSER_COMPOSER_CHECK_FAILURE_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::ALLOW_COMPOSER_COMPOSER_CHECK_FAILURE_OPTION)->asBoolean()) { $logger->log( CompilerLogger::CHEVRON_PREFIX, 'Warning! Incompatible composer version detected: '.$incompatibleComposerVersion->getMessage(), @@ -806,6 +806,7 @@ private static function signPharWithPrivateKey( CompilerLogger::QUESTION_MARK_PREFIX, 'Signing using a private key', ); + $io->newLine(); if ($prompt) { if (false === $io->isInteractive()) { diff --git a/src/Console/Command/Composer/ComposerCheckVersion.php b/src/Console/Command/Composer/ComposerCheckVersion.php index 64560457e..30fe5e1e0 100644 --- a/src/Console/Command/Composer/ComposerCheckVersion.php +++ b/src/Console/Command/Composer/ComposerCheckVersion.php @@ -16,7 +16,7 @@ use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Composer\ComposerOrchestrator; /** diff --git a/src/Console/Command/Composer/ComposerCommand.php b/src/Console/Command/Composer/ComposerCommand.php index 4e54b955d..083f846b8 100644 --- a/src/Console/Command/Composer/ComposerCommand.php +++ b/src/Console/Command/Composer/ComposerCommand.php @@ -16,7 +16,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FileSystem; use KevinGH\Box\Composer\ComposerOrchestrator; use KevinGH\Box\Composer\ComposerProcessFactory; @@ -76,7 +76,7 @@ abstract protected function orchestrate(ComposerOrchestrator $composerOrchestrat private static function getComposerExecutable(IO $io): ?string { - $composerBin = $io->getOption(self::COMPOSER_BIN_OPTION)->asNullableNonEmptyString(); + $composerBin = $io->getTypedOption(self::COMPOSER_BIN_OPTION)->asNullableNonEmptyString(); return null === $composerBin ? null : Path::makeAbsolute($composerBin, getcwd()); } diff --git a/src/Console/Command/Composer/ComposerVendorDir.php b/src/Console/Command/Composer/ComposerVendorDir.php index 65d77e209..d070cbb02 100644 --- a/src/Console/Command/Composer/ComposerVendorDir.php +++ b/src/Console/Command/Composer/ComposerVendorDir.php @@ -16,7 +16,7 @@ use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Composer\ComposerOrchestrator; /** diff --git a/src/Console/Command/ConfigOption.php b/src/Console/Command/ConfigOption.php index 2e7947944..88a2a20e1 100644 --- a/src/Console/Command/ConfigOption.php +++ b/src/Console/Command/ConfigOption.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console\Command; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Configuration\Configuration; use KevinGH\Box\Console\ConfigurationLoader; use KevinGH\Box\Json\JsonValidationException; diff --git a/src/Console/Command/Diff.php b/src/Console/Command/Diff.php index 81202cbaa..fc8c2596e 100644 --- a/src/Console/Command/Diff.php +++ b/src/Console/Command/Diff.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\PharInfoRenderer; use KevinGH\Box\Phar\DiffMode; use KevinGH\Box\Phar\PharDiff; @@ -154,8 +154,8 @@ public function execute(IO $io): int private static function getPaths(IO $io): array { $paths = [ - $io->getArgument(self::FIRST_PHAR_ARG)->asNonEmptyString(), - $io->getArgument(self::SECOND_PHAR_ARG)->asNonEmptyString(), + $io->getTypedArgument(self::FIRST_PHAR_ARG)->asNonEmptyString(), + $io->getTypedArgument(self::SECOND_PHAR_ARG)->asNonEmptyString(), ]; Assert::allFile($paths); @@ -218,7 +218,7 @@ private static function createColorizedDiff(string $pharASummary, string $pharBS private static function getDiffMode(IO $io): DiffMode { - if ($io->getOption(self::GNU_DIFF_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::GNU_DIFF_OPTION)->asBoolean()) { $io->writeln( sprintf( '⚠️ Using the option "%s" is deprecated. Use "--%s=%s" instead.', @@ -231,7 +231,7 @@ private static function getDiffMode(IO $io): DiffMode return DiffMode::GNU; } - if ($io->getOption(self::GIT_DIFF_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::GIT_DIFF_OPTION)->asBoolean()) { $io->writeln( sprintf( '⚠️ Using the option "%s" is deprecated. Use "--%s=%s" instead.', @@ -244,7 +244,7 @@ private static function getDiffMode(IO $io): DiffMode return DiffMode::GIT; } - if ($io->getOption(self::LIST_FILES_DIFF_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::LIST_FILES_DIFF_OPTION)->asBoolean()) { $io->writeln( sprintf( '⚠️ Using the option "%s" is deprecated. Use "--%s=%s" instead.', @@ -270,7 +270,7 @@ private static function getDiffMode(IO $io): DiffMode return DiffMode::FILE_NAME; } - $rawDiffOption = $io->getOption(self::DIFF_OPTION)->asNonEmptyString(); + $rawDiffOption = $io->getTypedOption(self::DIFF_OPTION)->asNonEmptyString(); try { return DiffMode::from($rawDiffOption); @@ -291,7 +291,7 @@ private static function getDiffMode(IO $io): DiffMode private static function getChecksumAlgorithm(IO $io): string { - $checksumAlgorithm = $io->getOption(self::CHECK_OPTION)->asNullableNonEmptyString(); + $checksumAlgorithm = $io->getTypedOption(self::CHECK_OPTION)->asNullableNonEmptyString(); if (null !== $checksumAlgorithm) { $io->writeln( @@ -305,7 +305,7 @@ private static function getChecksumAlgorithm(IO $io): string return $checksumAlgorithm; } - return $io->getOption(self::CHECKSUM_ALGORITHM_OPTION)->asNullableNonEmptyString() ?? self::DEFAULT_CHECKSUM_ALGO; + return $io->getTypedOption(self::CHECKSUM_ALGORITHM_OPTION)->asNullableNonEmptyString() ?? self::DEFAULT_CHECKSUM_ALGO; } private function renderContentsDiff(PharDiff $diff, DiffMode $diffMode, string $checksumAlgorithm, IO $io): void diff --git a/src/Console/Command/Extract.php b/src/Console/Command/Extract.php index bae280a42..0770d9d4a 100644 --- a/src/Console/Command/Extract.php +++ b/src/Console/Command/Extract.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FS; use KevinGH\Box\Phar\InvalidPhar; use KevinGH\Box\Phar\PharFactory; @@ -79,8 +79,8 @@ public function execute(IO $io): int check_php_settings($io); $pharPath = self::getPharFilePath($io); - $outputDir = $io->getArgument(self::OUTPUT_ARG)->asNonEmptyString(); - $internal = $io->getOption(self::INTERNAL_OPT)->asBoolean(); + $outputDir = $io->getTypedArgument(self::OUTPUT_ARG)->asNonEmptyString(); + $internal = $io->getTypedOption(self::INTERNAL_OPT)->asBoolean(); if (null === $pharPath) { return ExitCode::FAILURE; @@ -124,7 +124,7 @@ public function execute(IO $io): int private static function getPharFilePath(IO $io): ?string { - $filePath = realpath($io->getArgument(self::PHAR_ARG)->asString()); + $filePath = realpath($io->getTypedArgument(self::PHAR_ARG)->asString()); if (false !== $filePath) { return $filePath; @@ -133,7 +133,7 @@ private static function getPharFilePath(IO $io): ?string $io->error( sprintf( 'The file "%s" could not be found.', - $io->getArgument(self::PHAR_ARG)->asRaw(), + $io->getTypedArgument(self::PHAR_ARG)->asRaw(), ), ); diff --git a/src/Console/Command/GenerateDockerFile.php b/src/Console/Command/GenerateDockerFile.php index 52dd7c61d..9ba23ce41 100644 --- a/src/Console/Command/GenerateDockerFile.php +++ b/src/Console/Command/GenerateDockerFile.php @@ -18,7 +18,7 @@ use Fidry\Console\Command\CommandAwareness; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FS; use KevinGH\Box\DockerFileGenerator; use Symfony\Component\Console\Input\InputArgument; @@ -76,6 +76,7 @@ public function execute(IO $io): int $pharFilePath, ), ); + $io->newLine(); $requirementsFilePhar = 'phar://'.$pharFilePath.'/.box/.requirements.php'; @@ -91,7 +92,7 @@ public function execute(IO $io): int */ private function getPharFilePath(IO $io): ?string { - $pharFilePath = $io->getArgument(self::PHAR_ARG)->asNullableNonEmptyString(); + $pharFilePath = $io->getTypedArgument(self::PHAR_ARG)->asNullableNonEmptyString(); if (null === $pharFilePath) { $pharFilePath = $this->guessPharPath($io); diff --git a/src/Console/Command/Info.php b/src/Console/Command/Info.php index 69651e1a2..3239eee6a 100644 --- a/src/Console/Command/Info.php +++ b/src/Console/Command/Info.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\PharInfoRenderer; use KevinGH\Box\Phar\PharInfo; use Phar; @@ -100,7 +100,7 @@ public function execute(IO $io): int { $io->newLine(); - $file = $io->getArgument(self::PHAR_ARG)->asNullableNonEmptyString(); + $file = $io->getTypedArgument(self::PHAR_ARG)->asNullableNonEmptyString(); if (null === $file) { return self::showGlobalInfo($io); @@ -126,13 +126,13 @@ public function execute(IO $io): int public static function showInfo(string $file, IO $io): int { $maxDepth = self::getMaxDepth($io); - $mode = $io->getOption(self::MODE_OPT)->asStringChoice(self::MODES); + $mode = $io->getTypedOption(self::MODE_OPT)->asStringChoice(self::MODES); $pharInfo = new PharInfo($file); return self::showPharInfo( $pharInfo, - $io->getOption(self::LIST_OPT)->asBoolean(), + $io->getTypedOption(self::LIST_OPT)->asBoolean(), -1 === $maxDepth ? false : $maxDepth, 'indent' === $mode, $io, @@ -144,7 +144,7 @@ public static function showInfo(string $file, IO $io): int */ private static function getMaxDepth(IO $io): int { - $option = $io->getOption(self::DEPTH_OPT); + $option = $io->getTypedOption(self::DEPTH_OPT); return '-1' === $option->asRaw() ? -1 @@ -198,6 +198,7 @@ private static function showPharInfo( $indent, ); } else { + $io->newLine(); $io->comment('Use the --list|-l option to list the content of the PHAR.'); } diff --git a/src/Console/Command/Namespace_.php b/src/Console/Command/Namespace_.php index 44a01187c..e019478b3 100644 --- a/src/Console/Command/Namespace_.php +++ b/src/Console/Command/Namespace_.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use function current; use function explode; diff --git a/src/Console/Command/Process.php b/src/Console/Command/Process.php index cf22d31c5..775358fe8 100644 --- a/src/Console/Command/Process.php +++ b/src/Console/Command/Process.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration as ConsoleConfiguration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use Fidry\FileSystem\FS; use Humbug\PhpScoper\Symbol\SymbolsRegistry; use KevinGH\Box\Compactor\Compactor; @@ -85,7 +85,7 @@ public function getConfiguration(): ConsoleConfiguration public function execute(IO $io): int { - if ($io->getOption(self::NO_RESTART_OPTION)->asBoolean()) { + if ($io->getTypedOption(self::NO_RESTART_OPTION)->asBoolean()) { putenv(BOX_ALLOW_XDEBUG.'=1'); } @@ -95,11 +95,11 @@ public function execute(IO $io): int $io->newLine(); - $config = $io->getOption(self::NO_CONFIG_OPTION)->asBoolean() + $config = $io->getTypedOption(self::NO_CONFIG_OPTION)->asBoolean() ? Configuration::create(null, new stdClass()) : ConfigOption::getConfig($io, true); - $filePath = $io->getArgument(self::FILE_ARGUMENT)->asNonEmptyString(); + $filePath = $io->getTypedArgument(self::FILE_ARGUMENT)->asNonEmptyString(); $path = Path::makeRelative($filePath, $config->getBasePath()); diff --git a/src/Console/Command/Validate.php b/src/Console/Command/Validate.php index df4d11010..ba6a1654a 100644 --- a/src/Console/Command/Validate.php +++ b/src/Console/Command/Validate.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration as ConsoleConfiguration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Configuration\Configuration; use KevinGH\Box\Console\ConfigurationLoader; use KevinGH\Box\Console\ConfigurationLocator; @@ -77,7 +77,7 @@ public function execute(IO $io): int { try { $config = ConfigurationLoader::getConfig( - $io->getArgument(self::FILE_ARGUMENT)->asNullableNonEmptyString() ?? ConfigurationLocator::findDefaultPath(), + $io->getTypedArgument(self::FILE_ARGUMENT)->asNullableNonEmptyString() ?? ConfigurationLocator::findDefaultPath(), $io, false, ); @@ -96,7 +96,7 @@ public function execute(IO $io): int private static function checkConfig(Configuration $config, IO $io): int { - $ignoreRecommendationsAndWarnings = $io->getOption(self::IGNORE_MESSAGES_OPTION)->asBoolean(); + $ignoreRecommendationsAndWarnings = $io->getTypedOption(self::IGNORE_MESSAGES_OPTION)->asBoolean(); $recommendations = $config->getRecommendations(); $warnings = $config->getWarnings(); diff --git a/src/Console/Command/Verify.php b/src/Console/Command/Verify.php index d03f83db3..346872e9c 100644 --- a/src/Console/Command/Verify.php +++ b/src/Console/Command/Verify.php @@ -17,7 +17,7 @@ use Fidry\Console\Command\Command; use Fidry\Console\Command\Configuration; use Fidry\Console\ExitCode; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Phar\PharInfo; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Filesystem\Path; @@ -97,7 +97,7 @@ public function execute(IO $io): int private static function getPharFilePath(IO $io): string { $pharPath = Path::canonicalize( - $io->getArgument(self::PHAR_ARG)->asNonEmptyString(), + $io->getTypedArgument(self::PHAR_ARG)->asNonEmptyString(), ); Assert::file($pharPath); diff --git a/src/Console/ConfigurationLoader.php b/src/Console/ConfigurationLoader.php index 9b8830fad..e04ddc4c3 100644 --- a/src/Console/ConfigurationLoader.php +++ b/src/Console/ConfigurationLoader.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use InvalidArgumentException; use KevinGH\Box\Configuration\Configuration; use KevinGH\Box\Configuration\ConfigurationLoader as ConfigLoader; diff --git a/src/Console/Logger/CompilerLogger.php b/src/Console/Logger/CompilerLogger.php index abdf19104..5b19775f5 100644 --- a/src/Console/Logger/CompilerLogger.php +++ b/src/Console/Logger/CompilerLogger.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console\Logger; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use InvalidArgumentException; use Symfony\Component\Console\Output\OutputInterface; use function sprintf; diff --git a/src/Console/MessageRenderer.php b/src/Console/MessageRenderer.php index dc931200a..b39bbd14c 100644 --- a/src/Console/MessageRenderer.php +++ b/src/Console/MessageRenderer.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\NotInstantiable; use Webmozart\Assert\Assert; use function array_map; @@ -72,5 +72,7 @@ public static function render(IO $io, array $recommendations, array $warnings): array_map($renderMessage, $warnings), ); } + + $io->newLine(); } } diff --git a/src/Console/OutputFormatterConfigurator.php b/src/Console/OutputFormatterConfigurator.php index e9f496583..f06656610 100644 --- a/src/Console/OutputFormatterConfigurator.php +++ b/src/Console/OutputFormatterConfigurator.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Console; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\NotInstantiable; use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Formatter\OutputFormatterStyle; diff --git a/src/Console/PharInfoRenderer.php b/src/Console/PharInfoRenderer.php index 50096553e..d895cc85c 100644 --- a/src/Console/PharInfoRenderer.php +++ b/src/Console/PharInfoRenderer.php @@ -16,7 +16,7 @@ use Closure; use DateTimeImmutable; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\NotInstantiable; use KevinGH\Box\Phar\CompressionAlgorithm; use KevinGH\Box\Phar\PharInfo; diff --git a/src/DockerFileGenerator.php b/src/DockerFileGenerator.php index f2faa0e77..f8ae840a9 100644 --- a/src/DockerFileGenerator.php +++ b/src/DockerFileGenerator.php @@ -44,6 +44,7 @@ final class DockerFileGenerator Dockerfile; private const PHP_DOCKER_IMAGES = [ + // TODO: allow future images '8.2.0' => '8.2-cli-alpine', '8.1.0' => '8.1-cli-alpine', '8.0.0' => '8.0-cli-alpine', diff --git a/src/Phar/Differ/ChecksumDiffer.php b/src/Phar/Differ/ChecksumDiffer.php index 7fdd40fdd..06121135d 100644 --- a/src/Phar/Differ/ChecksumDiffer.php +++ b/src/Phar/Differ/ChecksumDiffer.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Phar\PharInfo; use UnexpectedValueException; use ValueError; diff --git a/src/Phar/Differ/Differ.php b/src/Phar/Differ/Differ.php index 4797b7c58..afdf6bd87 100644 --- a/src/Phar/Differ/Differ.php +++ b/src/Phar/Differ/Differ.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Phar\PharInfo; interface Differ diff --git a/src/Phar/Differ/FilenameDiffer.php b/src/Phar/Differ/FilenameDiffer.php index 69100e0bf..706d0af3d 100644 --- a/src/Phar/Differ/FilenameDiffer.php +++ b/src/Phar/Differ/FilenameDiffer.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\PharInfoRenderer; use KevinGH\Box\Phar\PharInfo; use SplFileInfo; @@ -88,6 +88,8 @@ private static function printDiff( $io->newLine(); self::renderPaths('+', $pharInfoB, $filesInBNotInA, $io); + $io->newLine(2); + $io->error( sprintf( '%d file(s) difference', diff --git a/src/Phar/Differ/GitDiffer.php b/src/Phar/Differ/GitDiffer.php index 8120674ac..5e2302fa7 100644 --- a/src/Phar/Differ/GitDiffer.php +++ b/src/Phar/Differ/GitDiffer.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\Command\Extract; use KevinGH\Box\Phar\PharInfo; use function array_filter; diff --git a/src/Phar/Differ/ProcessCommandBasedDiffer.php b/src/Phar/Differ/ProcessCommandBasedDiffer.php index ec77e6c37..eab2442a1 100644 --- a/src/Phar/Differ/ProcessCommandBasedDiffer.php +++ b/src/Phar/Differ/ProcessCommandBasedDiffer.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Phar\PharInfo; use Symfony\Component\Process\Process; diff --git a/src/Phar/PharDiff.php b/src/Phar/PharDiff.php index 73a5cee78..9d3f6976d 100644 --- a/src/Phar/PharDiff.php +++ b/src/Phar/PharDiff.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Phar\Differ\DifferFactory; use function array_map; diff --git a/src/Test/CommandTestCase.php b/src/Test/CommandTestCase.php index bc3df88a3..33483611e 100644 --- a/src/Test/CommandTestCase.php +++ b/src/Test/CommandTestCase.php @@ -14,8 +14,8 @@ namespace KevinGH\Box\Test; +use Fidry\Console\Bridge\Command\SymfonyCommand; use Fidry\Console\Command\Command; -use Fidry\Console\Command\SymfonyCommand; use Fidry\Console\Test\CommandTester; use Fidry\Console\Test\OutputAssertions; use Symfony\Component\Console\Application; diff --git a/src/functions.php b/src/functions.php index 8ff722dc1..b8e616b7e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -17,7 +17,7 @@ use Closure; use Composer\InstalledVersions; use ErrorException; -use Fidry\Console\Input\IO; +use Fidry\Console\IO; use KevinGH\Box\Console\Php\PhpSettingsHandler; use Phar; use Symfony\Component\Console\Helper\Helper; diff --git a/tests/Console/Command/CompileTest.php b/tests/Console/Command/CompileTest.php index ef4fa1d21..b77aedee7 100644 --- a/tests/Console/Command/CompileTest.php +++ b/tests/Console/Command/CompileTest.php @@ -15,8 +15,8 @@ namespace KevinGH\Box\Console\Command; use DirectoryIterator; +use Fidry\Console\Bridge\Command\SymfonyCommand; use Fidry\Console\Command\Command; -use Fidry\Console\Command\SymfonyCommand; use Fidry\Console\DisplayNormalizer; use Fidry\Console\ExitCode; use Fidry\Console\Test\CommandTester; From 186f264e90c0d8c03e7eb03d984f8cf214ca5969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:00:24 +0100 Subject: [PATCH 08/21] test(requirement-checker): Fix the requirement checker e2e tests (#1178) --- .../fail-complete/expected-boxmin-stderr.dist | 11 ++++------- .../fail-complete/expected-composermin-stderr.dist | 6 +++--- .../fail-conflict/expected-boxmin-stderr.dist | 8 ++++---- .../pass-complete/expected-boxmin-stderr.dist | 4 ++-- .../pass-complete/expected-composermin-stderr.dist | 4 ++-- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist b/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist index fe4c3e9df..46afb7ccd 100644 --- a/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist +++ b/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist @@ -6,11 +6,11 @@ Box Requirements Checker > PHP is not using any php.ini file. > Checking Box requirements: - ✘ The application requires a version matching "^10". - ✔ The application requires the extension "phar". + ✘ This application requires a PHP version matching "^10". + ✔ This application requires the extension "phar". ✔ The package "package-with-extensions" requires the extension "json". ✘ The package "package-with-extensions" requires the extension "ldap". - ✘ The package "package-with-extensions" requires the extension "random". + ✔ The package "package-with-extensions" requires the extension "random". [ERROR] Your system is not ready to run the application. @@ -19,11 +19,8 @@ Box Requirements Checker Fix the following mandatory requirements: ========================================= - * The application requires a version matching "^10". + * This application requires a PHP version matching "^10". * The package "package-with-extensions" requires the extension "ldap". You either need to enable it or request the application to be shipped with a polyfill for this extension. - * The package "package-with-extensions" requires the extension "random". You - either need to enable it or request the application to be shipped with a - polyfill for this extension. diff --git a/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist b/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist index 93f698f50..1dd77286c 100644 --- a/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist +++ b/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist @@ -6,8 +6,8 @@ Box Requirements Checker > PHP is not using any php.ini file. > Checking Box requirements: - ✘ The application requires a version matching "^10". - ✔ The application requires the extension "phar". + ✘ This application requires a PHP version matching "^10". + ✔ This application requires the extension "phar". ✔ The package "package-with-extensions" requires the extension "json". ✘ The package "package-with-extensions" requires the extension "ldap". ✘ The package "package-with-extensions" requires the extension "random". @@ -19,7 +19,7 @@ Box Requirements Checker Fix the following mandatory requirements: ========================================= - * The application requires a version matching "^10". + * This application requires a PHP version matching "^10". * The package "package-with-extensions" requires the extension "ldap". You either need to enable it or request the application to be shipped with a polyfill for this extension. diff --git a/requirement-checker/fixtures/fail-conflict/expected-boxmin-stderr.dist b/requirement-checker/fixtures/fail-conflict/expected-boxmin-stderr.dist index 5977bdcf8..e2640d72a 100644 --- a/requirement-checker/fixtures/fail-conflict/expected-boxmin-stderr.dist +++ b/requirement-checker/fixtures/fail-conflict/expected-boxmin-stderr.dist @@ -6,8 +6,8 @@ Box Requirements Checker > PHP is not using any php.ini file. > Checking Box requirements: - ✔ The application requires the extension "phar". - ✘ The application conflicts with the extension "pdo". + ✔ This application requires the extension "phar". + ✘ This application conflicts with the extension "pdo". [ERROR] Your system is not ready to run the application. @@ -16,6 +16,6 @@ Box Requirements Checker Fix the following mandatory requirements: ========================================= - * The application conflicts with the extension "pdo". You need to disable it in - order to run this application. + * This application conflicts with the extension "pdo". You need to disable it + in order to run this application. diff --git a/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist b/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist index 0d9258c06..9a245fd08 100644 --- a/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist +++ b/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist @@ -6,8 +6,8 @@ Box Requirements Checker > PHP is not using any php.ini file. > Checking Box requirements: - ✔ The application requires a version matching ">=5.3". - ✔ The application requires the extension "phar". + ✔ This application requires a PHP version matching ">=5.3". + ✔ This application requires the extension "phar". [OK] Your system is ready to run the application. diff --git a/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist b/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist index 0d9258c06..9a245fd08 100644 --- a/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist +++ b/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist @@ -6,8 +6,8 @@ Box Requirements Checker > PHP is not using any php.ini file. > Checking Box requirements: - ✔ The application requires a version matching ">=5.3". - ✔ The application requires the extension "phar". + ✔ This application requires a PHP version matching ">=5.3". + ✔ This application requires the extension "phar". [OK] Your system is ready to run the application. From 12487286a3be3f3f76c07039335ffb514c20aef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:12:28 +0100 Subject: [PATCH 09/21] ci(req-checker): Add dependabot (#1180) --- .github/dependabot.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 685fcb7e7..b3299f995 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,16 @@ version: 2 updates: - package-ecosystem: "composer" - directory: "/" + directory: "." + schedule: + interval: "weekly" + groups: + dependencies: + patterns: + - "*" + + - package-ecosystem: "composer" + directory: "requirement-checker" schedule: interval: "weekly" groups: From 362633f819ee6e3583207580c60a571634326172 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:44:34 +0000 Subject: [PATCH 10/21] build(deps): bump the dependencies group with 1 update (#1182) Bumps the dependencies group with 1 update: [humbug/php-scoper](https://github.com/humbug/php-scoper). - [Release notes](https://github.com/humbug/php-scoper/releases) - [Commits](https://github.com/humbug/php-scoper/compare/0.18.8...0.18.9) --- updated-dependencies: - dependency-name: humbug/php-scoper dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index d706d03f7..7dc128640 100644 --- a/composer.lock +++ b/composer.lock @@ -978,16 +978,16 @@ }, { "name": "humbug/php-scoper", - "version": "0.18.8", + "version": "0.18.9", "source": { "type": "git", "url": "https://github.com/humbug/php-scoper.git", - "reference": "eba4b11624c6064550d06b4ecd776fc61f969ad8" + "reference": "dd0a6721c38a26e18c1e36c0a718b6262350dd96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/eba4b11624c6064550d06b4ecd776fc61f969ad8", - "reference": "eba4b11624c6064550d06b4ecd776fc61f969ad8", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/dd0a6721c38a26e18c1e36c0a718b6262350dd96", + "reference": "dd0a6721c38a26e18c1e36c0a718b6262350dd96", "shasum": "" }, "require": { @@ -1055,9 +1055,9 @@ "description": "Prefixes all PHP namespaces in a file or directory.", "support": { "issues": "https://github.com/humbug/php-scoper/issues", - "source": "https://github.com/humbug/php-scoper/tree/0.18.8" + "source": "https://github.com/humbug/php-scoper/tree/0.18.9" }, - "time": "2023-11-18T23:13:18+00:00" + "time": "2023-11-21T21:00:48+00:00" }, { "name": "jetbrains/phpstorm-stubs", From 64f749acba5553628a549918755ff481d355ea86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:46:05 +0100 Subject: [PATCH 11/21] ci: Fix the release workflow permissions (#1179) See https://github.com/humbug/php-scoper/pull/923. --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43ecec93a..24f0d87cc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -86,6 +86,8 @@ jobs: needs: - build-phar if: github.event_name == 'release' + permissions: + contents: write steps: - uses: actions/download-artifact@v3 with: From f306ce1df2d5377870f76d73922a0223cafa1d3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:02:07 +0000 Subject: [PATCH 12/21] build(deps-dev): bump the dependencies group in /requirement-checker with 4 updates (#1181) build(deps-dev): bump the dependencies group Bumps the dependencies group in /requirement-checker with 4 updates: [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), [fidry/makefile](https://github.com/theofidry/makefile), [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) and [symfony/yaml](https://github.com/symfony/yaml). Updates `ergebnis/composer-normalize` from 2.37.0 to 2.39.0 - [Release notes](https://github.com/ergebnis/composer-normalize/releases) - [Changelog](https://github.com/ergebnis/composer-normalize/blob/main/CHANGELOG.md) - [Commits](https://github.com/ergebnis/composer-normalize/compare/2.37.0...2.39.0) Updates `fidry/makefile` from 0.2.3 to 1.0.1 - [Release notes](https://github.com/theofidry/makefile/releases) - [Commits](https://github.com/theofidry/makefile/compare/0.2.3...1.0.1) Updates `phpunit/phpunit` from 9.6.13 to 10.4.2 - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.4.2/ChangeLog-10.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.13...10.4.2) Updates `symfony/yaml` from 6.3.3 to 6.3.8 - [Release notes](https://github.com/symfony/yaml/releases) - [Changelog](https://github.com/symfony/yaml/blob/6.3/CHANGELOG.md) - [Commits](https://github.com/symfony/yaml/compare/v6.3.3...v6.3.8) --- updated-dependencies: - dependency-name: ergebnis/composer-normalize dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: fidry/makefile dependency-type: direct:development update-type: version-update:semver-major dependency-group: dependencies - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-major dependency-group: dependencies - dependency-name: symfony/yaml dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirement-checker/composer.json | 4 +- requirement-checker/composer.lock | 833 +++++++++++++----------------- 2 files changed, 368 insertions(+), 469 deletions(-) diff --git a/requirement-checker/composer.json b/requirement-checker/composer.json index 7a123530d..4d9b9ed53 100644 --- a/requirement-checker/composer.json +++ b/requirement-checker/composer.json @@ -18,8 +18,8 @@ }, "require-dev": { "ergebnis/composer-normalize": "^2.29", - "fidry/makefile": "^0.2.1", - "phpunit/phpunit": "^9.0", + "fidry/makefile": "^1.0.1", + "phpunit/phpunit": "^10.4", "symfony/yaml": "^6.2" }, "autoload": { diff --git a/requirement-checker/composer.lock b/requirement-checker/composer.lock index 70be2eb1a..3d3a3ee99 100644 --- a/requirement-checker/composer.lock +++ b/requirement-checker/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": "4320befde0ee29cb238d2c58d1f61b9f", + "content-hash": "49c860452ae431f6b5439e7f7d82ffa2", "packages": [ { "name": "composer/semver", @@ -89,110 +89,40 @@ } ], "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, { "name": "ergebnis/composer-normalize", - "version": "2.37.0", + "version": "2.39.0", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "25d0fa13545452208fe21216608ed62b637e40f0" + "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/25d0fa13545452208fe21216608ed62b637e40f0", - "reference": "25d0fa13545452208fe21216608ed62b637e40f0", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/a878360bc8cb5cb440b9381f72b0aaa125f937c7", + "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", - "ergebnis/json": "^1.0.1", - "ergebnis/json-normalizer": "^4.2.0", - "ergebnis/json-printer": "^3.3.0", + "ergebnis/json": "^1.1.0", + "ergebnis/json-normalizer": "^4.3.0", + "ergebnis/json-printer": "^3.4.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", "localheinz/diff": "^1.1.1", - "php": "~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "composer/composer": "^2.6.3", + "composer/composer": "^2.6.5", "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "^5.15.1", + "ergebnis/php-cs-fixer-config": "~6.7.0", "ergebnis/phpunit-slow-test-detector": "^2.3.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.0", - "phpunit/phpunit": "^10.3.4", + "infection/infection": "~0.27.4", + "phpunit/phpunit": "^10.4.1", "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.3", + "rector/rector": "~0.18.5", "symfony/filesystem": "^6.0.13", "vimeo/psalm": "^5.15.0" }, @@ -217,7 +147,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides a composer plugin for normalizing composer.json.", @@ -233,36 +164,37 @@ "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2023-09-15T09:25:45+00:00" + "time": "2023-10-10T15:43:27+00:00" }, { "name": "ergebnis/json", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json.git", - "reference": "d66ea30060856d0729a4aa319a02752519ca63a0" + "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/d66ea30060856d0729a4aa319a02752519ca63a0", - "reference": "d66ea30060856d0729a4aa319a02752519ca63a0", + "url": "https://api.github.com/repos/ergebnis/json/zipball/9f2b9086c43b189d7044a5b6215a931fb6e9125d", + "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d", "shasum": "" }, "require": { - "php": "^8.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.29.0", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.0.0", - "ergebnis/phpstan-rules": "^1.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "^9.5.27", + "ergebnis/data-provider": "^3.0.0", + "ergebnis/license": "^2.2.0", + "ergebnis/php-cs-fixer-config": "^6.6.0", + "ergebnis/phpunit-slow-test-detector": "^2.3.0", + "fakerphp/faker": "^1.23.0", + "infection/infection": "~0.27.4", + "phpunit/phpunit": "^10.4.1", "psalm/plugin-phpunit": "~0.18.4", - "vimeo/psalm": "^5.1.0" + "rector/rector": "~0.18.5", + "vimeo/psalm": "^5.15.0" }, "type": "library", "extra": { @@ -283,7 +215,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides a Json value object for representing a valid JSON string.", @@ -293,47 +226,48 @@ ], "support": { "issues": "https://github.com/ergebnis/json/issues", + "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json" }, - "time": "2022-12-10T22:38:50+00:00" + "time": "2023-10-10T07:57:48+00:00" }, { "name": "ergebnis/json-normalizer", - "version": "4.2.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "7d06355857dc5fad96e8b296996f26150dfab299" + "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/7d06355857dc5fad96e8b296996f26150dfab299", - "reference": "7d06355857dc5fad96e8b296996f26150dfab299", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", + "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.1", + "ergebnis/json": "^1.1.0", "ergebnis/json-pointer": "^3.2.0", - "ergebnis/json-printer": "^3.3.0", - "ergebnis/json-schema-validator": "^4.0.0", + "ergebnis/json-printer": "^3.4.0", + "ergebnis/json-schema-validator": "^4.1.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "composer/semver": "^3.2.1", - "ergebnis/data-provider": "^2.0.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.11.0", + "composer/semver": "^3.4.0", + "ergebnis/data-provider": "^3.0.0", + "ergebnis/license": "^2.2.0", + "ergebnis/php-cs-fixer-config": "~6.7.0", "ergebnis/phpunit-slow-test-detector": "^2.3.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.0", - "phpunit/phpunit": "^10.2.3", + "infection/infection": "~0.27.4", + "phpunit/phpunit": "^10.4.1", "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.17.2", + "rector/rector": "~0.18.5", "symfony/filesystem": "^6.3.1", - "symfony/finder": "^6.3.0", - "vimeo/psalm": "^5.13.1" + "symfony/finder": "^6.3.5", + "vimeo/psalm": "^5.15.0" }, "suggest": { "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" @@ -351,7 +285,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", @@ -362,37 +297,40 @@ ], "support": { "issues": "https://github.com/ergebnis/json-normalizer/issues", + "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-normalizer" }, - "time": "2023-07-09T16:22:57+00:00" + "time": "2023-10-10T15:15:03+00:00" }, { "name": "ergebnis/json-pointer", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8" + "reference": "8e517faefc06b7c761eaa041febef51a9375819a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/861516ff5afa1aa8905fdf3361315909523a1bf8", - "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/8e517faefc06b7c761eaa041febef51a9375819a", + "reference": "8e517faefc06b7c761eaa041febef51a9375819a", "shasum": "" }, "require": { - "php": "^8.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.28.3", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "vimeo/psalm": "^4.30" + "ergebnis/composer-normalize": "^2.29.0", + "ergebnis/data-provider": "^3.0.0", + "ergebnis/license": "^2.2.0", + "ergebnis/php-cs-fixer-config": "~6.7.0", + "ergebnis/phpunit-slow-test-detector": "^2.3.0", + "fakerphp/faker": "^1.23.0", + "infection/infection": "~0.27.4", + "phpunit/phpunit": "^10.4.1", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.18.5", + "vimeo/psalm": "^5.15.0" }, "type": "library", "extra": { @@ -413,7 +351,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides JSON pointer as a value object.", @@ -425,37 +364,40 @@ ], "support": { "issues": "https://github.com/ergebnis/json-pointer/issues", + "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-pointer" }, - "time": "2022-11-28T17:03:31+00:00" + "time": "2023-10-10T14:41:06+00:00" }, { "name": "ergebnis/json-printer", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-printer.git", - "reference": "18920367473b099633f644f0ca6dc8794345148f" + "reference": "05841593d72499de4f7ce4034a237c77e470558f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/18920367473b099633f644f0ca6dc8794345148f", - "reference": "18920367473b099633f644f0ca6dc8794345148f", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/05841593d72499de4f7ce4034a237c77e470558f", + "reference": "05841593d72499de4f7ce4034a237c77e470558f", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^8.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "ergebnis/license": "^2.0.0", - "ergebnis/php-cs-fixer-config": "^4.11.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "vimeo/psalm": "^4.30.0" + "ergebnis/license": "^2.2.0", + "ergebnis/php-cs-fixer-config": "^6.6.0", + "ergebnis/phpunit-slow-test-detector": "^2.3.0", + "fakerphp/faker": "^1.23.0", + "infection/infection": "~0.27.3", + "phpunit/phpunit": "^10.4.1", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.18.5", + "vimeo/psalm": "^5.15.0" }, "type": "library", "autoload": { @@ -470,7 +412,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides a JSON printer, allowing for flexible indentation.", @@ -482,41 +425,44 @@ ], "support": { "issues": "https://github.com/ergebnis/json-printer/issues", + "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-printer" }, - "time": "2022-11-28T10:27:43+00:00" + "time": "2023-10-10T07:42:48+00:00" }, { "name": "ergebnis/json-schema-validator", - "version": "4.0.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723" + "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/a6166272ac5691a9bc791f185841e5f92a6d4723", - "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", + "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.0", + "ergebnis/json": "^1.0.1", "ergebnis/json-pointer": "^3.2.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "^8.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.21.0", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "~5.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "~9.5.27", + "ergebnis/data-provider": "^3.0.0", + "ergebnis/license": "^2.2.0", + "ergebnis/php-cs-fixer-config": "~6.6.0", + "ergebnis/phpunit-slow-test-detector": "^2.3.0", + "fakerphp/faker": "^1.23.0", + "infection/infection": "~0.27.4", + "phpunit/phpunit": "^10.4.1", "psalm/plugin-phpunit": "~0.18.4", - "vimeo/psalm": "^5.1.0" + "rector/rector": "~0.18.5", + "vimeo/psalm": "^5.15.0" }, "type": "library", "extra": { @@ -537,7 +483,8 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", @@ -549,22 +496,23 @@ ], "support": { "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-schema-validator" }, - "time": "2022-12-10T14:50:15+00:00" + "time": "2023-10-10T14:16:57+00:00" }, { "name": "fidry/makefile", - "version": "0.2.3", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/theofidry/makefile.git", - "reference": "fb346e2568c2ad3c7526b0cc80ab6e18ff42e573" + "reference": "be5a048dcc5648d04e924facce0f85b406d731e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/makefile/zipball/fb346e2568c2ad3c7526b0cc80ab6e18ff42e573", - "reference": "fb346e2568c2ad3c7526b0cc80ab6e18ff42e573", + "url": "https://api.github.com/repos/theofidry/makefile/zipball/be5a048dcc5648d04e924facce0f85b406d731e4", + "reference": "be5a048dcc5648d04e924facce0f85b406d731e4", "shasum": "" }, "require": { @@ -608,7 +556,7 @@ ], "support": { "issues": "https://github.com/theofidry/makefile/issues", - "source": "https://github.com/theofidry/makefile/tree/0.2.3" + "source": "https://github.com/theofidry/makefile/tree/1.0.1" }, "funding": [ { @@ -616,7 +564,7 @@ "type": "github" } ], - "time": "2023-10-06T15:39:51+00:00" + "time": "2023-10-13T23:49:14+00:00" }, { "name": "justinrainbow/json-schema", @@ -976,16 +924,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "10.1.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/84838eed9ded511f61dc3e8b5944a52d9017b297", + "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297", "shasum": "" }, "require": { @@ -993,18 +941,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1013,7 +961,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -1042,7 +990,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.8" }, "funding": [ { @@ -1050,32 +998,32 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-11-15T13:31:15+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1102,7 +1050,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -1110,28 +1059,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1139,7 +1088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1165,7 +1114,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1173,32 +1122,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1224,7 +1173,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1232,32 +1182,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1283,7 +1233,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -1291,24 +1241,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "10.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1318,27 +1267,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1346,7 +1294,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -1378,7 +1326,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" }, "funding": [ { @@ -1394,32 +1342,32 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1442,7 +1390,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -1450,32 +1398,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1498,7 +1446,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -1506,32 +1454,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1553,7 +1501,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -1561,34 +1509,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1627,7 +1577,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -1635,33 +1586,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -1684,7 +1635,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -1692,33 +1644,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1750,7 +1702,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -1758,27 +1711,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1786,7 +1739,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1805,7 +1758,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1813,7 +1766,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -1821,34 +1775,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1890,7 +1844,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -1898,38 +1853,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1954,7 +1906,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -1962,33 +1915,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2011,7 +1964,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -2019,34 +1973,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2068,7 +2022,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2076,32 +2030,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2123,7 +2077,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2131,32 +2085,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2186,7 +2140,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -2194,87 +2148,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2297,7 +2196,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -2305,29 +2204,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2350,7 +2249,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -2358,11 +2257,11 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -2409,7 +2308,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -2511,16 +2410,16 @@ }, { "name": "symfony/yaml", - "version": "v6.3.3", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" + "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92", + "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92", "shasum": "" }, "require": { @@ -2563,7 +2462,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.3" + "source": "https://github.com/symfony/yaml/tree/v6.3.8" }, "funding": [ { @@ -2579,7 +2478,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-11-06T10:58:05+00:00" }, { "name": "thecodingmachine/safe", @@ -2722,16 +2621,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -2760,7 +2659,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -2768,7 +2667,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], From 003a0e0ac804c1740d06c6fcfcb76fb2276876cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:08:34 +0100 Subject: [PATCH 13/21] refactor: Move the constants into a dedicated class (#1184) --- composer.json | 1 - src/Composer/ComposerProcessFactory.php | 4 ++-- src/Console/Php/PhpSettingsHandler.php | 6 +++--- src/{consts.php => Constants.php} | 19 ++++++++++--------- src/Phar/PharInfo.php | 4 ++-- src/functions.php | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) rename src/{consts.php => Constants.php} (51%) diff --git a/composer.json b/composer.json index d949a74c9..d4b8722c6 100644 --- a/composer.json +++ b/composer.json @@ -72,7 +72,6 @@ "KevinGH\\Box\\": "src" }, "files": [ - "src/consts.php", "src/functions.php" ], "exclude-from-classmap": [ diff --git a/src/Composer/ComposerProcessFactory.php b/src/Composer/ComposerProcessFactory.php index 1cfbb8878..6584ce950 100644 --- a/src/Composer/ComposerProcessFactory.php +++ b/src/Composer/ComposerProcessFactory.php @@ -16,10 +16,10 @@ use Closure; use Fidry\Console\IO; +use KevinGH\Box\Constants; use RuntimeException; use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\Process; -use const KevinGH\Box\BOX_ALLOW_XDEBUG; /** * @final @@ -143,7 +143,7 @@ private static function getDefaultEnvVars(): array { $vars = ['COMPOSER_ORIGINAL_INIS' => '']; - if ('1' === (string) getenv(BOX_ALLOW_XDEBUG)) { + if ('1' === (string) getenv(Constants::ALLOW_XDEBUG)) { $vars['COMPOSER_ALLOW_XDEBUG'] = '1'; } diff --git a/src/Console/Php/PhpSettingsHandler.php b/src/Console/Php/PhpSettingsHandler.php index ccec96722..059716b90 100644 --- a/src/Console/Php/PhpSettingsHandler.php +++ b/src/Console/Php/PhpSettingsHandler.php @@ -16,6 +16,7 @@ use Composer\XdebugHandler\XdebugHandler; use Fidry\FileSystem\FS; +use KevinGH\Box\Constants; use KevinGH\Box\Phar\PharPhpSettings; use Psr\Log\LoggerInterface; use Webmozart\Assert\Assert; @@ -26,7 +27,6 @@ use function KevinGH\Box\memory_to_bytes; use function sprintf; use function trim; -use const KevinGH\Box\BOX_MEMORY_LIMIT; use const PHP_EOL; /** @@ -128,7 +128,7 @@ private function bumpMemoryLimit(): void sprintf( 'Changed the memory limit from "%s" to %s="%s"', format_size($memoryLimitInBytes, 0), - BOX_MEMORY_LIMIT, + Constants::MEMORY_LIMIT, format_size($userDefinedMemoryLimit, 0), ), ); @@ -144,7 +144,7 @@ private function bumpMemoryLimit(): void private static function getUserDefinedMemoryLimit(): ?int { - $memoryLimit = getenv(BOX_MEMORY_LIMIT); + $memoryLimit = getenv(Constants::MEMORY_LIMIT); if (false === $memoryLimit) { $memoryLimitInBytes = null; diff --git a/src/consts.php b/src/Constants.php similarity index 51% rename from src/consts.php rename to src/Constants.php index ff248eedd..036758689 100644 --- a/src/consts.php +++ b/src/Constants.php @@ -14,13 +14,14 @@ namespace KevinGH\Box; -// Public constants pointing to environment variable names -const BOX_MEMORY_LIMIT = 'BOX_MEMORY_LIMIT'; -const BOX_ALLOW_XDEBUG = 'BOX_ALLOW_XDEBUG'; +final class Constants +{ + use NotInstantiable; -/** - * @internal - * - * @private - */ -const _NO_PARALLEL_PROCESSING = '_BOX_NO_PARALLEL_PROCESSING'; + public const MEMORY_LIMIT = 'BOX_MEMORY_LIMIT'; + public const ALLOW_XDEBUG = 'BOX_ALLOW_XDEBUG'; + public const BIN = 'BOX_BIN'; + + /** @internal */ + public const NO_PARALLEL_PROCESSING = '_BOX_NO_PARALLEL_PROCESSING'; +} diff --git a/src/Phar/PharInfo.php b/src/Phar/PharInfo.php index ed10a7e0a..5173c04a2 100644 --- a/src/Phar/PharInfo.php +++ b/src/Phar/PharInfo.php @@ -45,6 +45,7 @@ use Fidry\FileSystem\FS; use KevinGH\Box\Console\Command\Extract; +use KevinGH\Box\Constants; use OutOfBoundsException; use Phar; use RuntimeException; @@ -347,8 +348,7 @@ private static function getPhpExecutable(): string private static function getBoxBin(): string { - // TODO: move the constraint strings declaration in one place - return getenv('BOX_BIN') ?: $_SERVER['SCRIPT_NAME']; + return getenv(Constants::BIN) ?: $_SERVER['SCRIPT_NAME']; } /** diff --git a/src/functions.php b/src/functions.php index b8e616b7e..6b8f05019 100644 --- a/src/functions.php +++ b/src/functions.php @@ -183,8 +183,8 @@ class_alias(\Symfony\Component\Finder\Finder::class, \Isolated\Symfony\Component */ function disable_parallel_processing(): void { - if (false === defined(_NO_PARALLEL_PROCESSING)) { - define(_NO_PARALLEL_PROCESSING, true); + if (false === defined(Constants::NO_PARALLEL_PROCESSING)) { + define(Constants::NO_PARALLEL_PROCESSING, true); } } @@ -193,7 +193,7 @@ function disable_parallel_processing(): void */ function is_parallel_processing_enabled(): bool { - return false === defined(_NO_PARALLEL_PROCESSING) || false === constant(_NO_PARALLEL_PROCESSING); + return false === defined(Constants::NO_PARALLEL_PROCESSING) || false === constant(Constants::NO_PARALLEL_PROCESSING); } /** From 5f1b475043f429d833536d1a9b49b89e5ab28b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:39:49 +0100 Subject: [PATCH 14/21] fix: Fix PharInfo BC (#1186) fix: Fix BC for PharInfo --- src/PharInfo/PharInfo.php | 101 +++++++++++++++++++++++++++++++------- 1 file changed, 84 insertions(+), 17 deletions(-) diff --git a/src/PharInfo/PharInfo.php b/src/PharInfo/PharInfo.php index 71bbffa84..27199a5f6 100644 --- a/src/PharInfo/PharInfo.php +++ b/src/PharInfo/PharInfo.php @@ -14,9 +14,11 @@ namespace KevinGH\Box\PharInfo; -use KevinGH\Box\Phar\PharInfo as NewPharInfo; +use KevinGH\Box\Phar\CompressionAlgorithm; use Phar; use PharData; +use PharFileInfo; +use RecursiveIteratorIterator; use UnexpectedValueException; use function KevinGH\Box\unique_id; use function realpath; @@ -27,35 +29,56 @@ */ final class PharInfo { - private NewPharInfo $decoratedPharInfo; + private static array $ALGORITHMS; private PharData|Phar $phar; - public function __construct(private readonly string $pharFile) + private ?array $compressionCount = null; + private ?string $hash = null; + + public function __construct(string $pharFile) + { + self::initAlgorithms(); + + try { + $this->phar = new Phar($pharFile); + } catch (UnexpectedValueException) { + $this->phar = new PharData($pharFile); + } + } + + private static function initAlgorithms(): void { - $this->decoratedPharInfo = new NewPharInfo($pharFile); + if (!isset(self::$ALGORITHMS)) { + self::$ALGORITHMS = []; + + foreach (CompressionAlgorithm::cases() as $compressionAlgorithm) { + self::$ALGORITHMS[$compressionAlgorithm->value] = $compressionAlgorithm->name; + } + } } public function equals(self $pharInfo): bool { - return $this->decoratedPharInfo->equals($pharInfo->decoratedPharInfo); + return + $pharInfo->getCompressionCount() === $this->getCompressionCount() + && $pharInfo->getNormalizedMetadata() === $this->getNormalizedMetadata(); } public function getCompressionCount(): array { - return $this->decoratedPharInfo->getFilesCompressionCount(); + if (null === $this->compressionCount || $this->hash !== $this->getPharHash()) { + $this->compressionCount = $this->calculateCompressionCount(); + $this->compressionCount['None'] = $this->compressionCount[CompressionAlgorithm::NONE->name]; + unset($this->compressionCount[CompressionAlgorithm::NONE->name]); + $this->hash = $this->getPharHash(); + } + + return $this->compressionCount; } public function getPhar(): Phar|PharData { - if (!isset($this->phar)) { - try { - $this->phar = new Phar($this->pharFile); - } catch (UnexpectedValueException) { - $this->phar = new PharData($this->pharFile); - } - } - return $this->phar; } @@ -67,16 +90,60 @@ public function getRoot(): string public function getVersion(): string { - return $this->decoratedPharInfo->getVersion(); + // Do not cache the result + return '' !== $this->phar->getVersion() ? $this->phar->getVersion() : 'No information found'; } public function getNormalizedMetadata(): ?string { - return $this->decoratedPharInfo->getNormalizedMetadata(); + // Do not cache the result + $metadata = var_export($this->phar->getMetadata(), true); + + return 'NULL' === $metadata ? null : $metadata; } private function getPharHash(): string { - return $this->decoratedPharInfo->getSignature()['hash'] ?? unique_id(''); + // If no signature is available (e.g. a tar.gz file), we generate a random hash to ensure + // it will always be invalidated + return $this->phar->getSignature()['hash'] ?? unique_id(''); + } + + private function calculateCompressionCount(): array + { + $count = array_fill_keys( + self::$ALGORITHMS, + 0, + ); + + if ($this->phar instanceof PharData) { + $count[self::$ALGORITHMS[$this->phar->isCompressed()]] = 1; + + return $count; + } + + $countFile = static function (array $count, PharFileInfo $file): array { + if (false === $file->isCompressed()) { + ++$count[CompressionAlgorithm::NONE->name]; + + return $count; + } + + foreach (self::$ALGORITHMS as $compressionAlgorithmCode => $compressionAlgorithmName) { + if ($file->isCompressed($compressionAlgorithmCode)) { + ++$count[$compressionAlgorithmName]; + + return $count; + } + } + + return $count; + }; + + return array_reduce( + iterator_to_array(new RecursiveIteratorIterator($this->phar), true), + $countFile, + $count, + ); } } From 1cd9751794098ebda97a2f43797583407c64c3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:40:18 +0100 Subject: [PATCH 15/21] refactor: Move finding the PHP or Box bin into a dedicated class (#1185) --- src/ExecutableFinder.php | 52 ++++++++++++++++++++++++++++++++++++++++ src/Phar/PharInfo.php | 31 +++--------------------- 2 files changed, 55 insertions(+), 28 deletions(-) create mode 100644 src/ExecutableFinder.php diff --git a/src/ExecutableFinder.php b/src/ExecutableFinder.php new file mode 100644 index 000000000..f692d0cde --- /dev/null +++ b/src/ExecutableFinder.php @@ -0,0 +1,52 @@ + + * Théo Fidry + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace KevinGH\Box; + +use RuntimeException; +use Symfony\Component\Process\PhpExecutableFinder as SymfonyPhpExecutableFinder; + +final class ExecutableFinder +{ + private static string $boxExecutable; + private static string $phpExecutable; + + public static function findBoxExecutable(): string + { + if (isset(self::$boxExecutable)) { + return self::$boxExecutable; + } + + self::$boxExecutable = getenv(Constants::BIN) ?: $_SERVER['SCRIPT_NAME']; + + return self::$boxExecutable; + } + + public static function findPhpExecutable(): string + { + if (isset(self::$phpExecutable)) { + return self::$phpExecutable; + } + + $phpExecutable = (new SymfonyPhpExecutableFinder())->find(); + + if (false === $phpExecutable) { + throw new RuntimeException('Could not find a PHP executable.'); + } + + self::$phpExecutable = $phpExecutable; + + return self::$phpExecutable; + } +} diff --git a/src/Phar/PharInfo.php b/src/Phar/PharInfo.php index 5173c04a2..9a7be3929 100644 --- a/src/Phar/PharInfo.php +++ b/src/Phar/PharInfo.php @@ -45,19 +45,16 @@ use Fidry\FileSystem\FS; use KevinGH\Box\Console\Command\Extract; -use KevinGH\Box\Constants; +use KevinGH\Box\ExecutableFinder; use OutOfBoundsException; use Phar; -use RuntimeException; use Symfony\Component\Filesystem\Path; use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; use function bin2hex; use function file_exists; -use function getenv; use function is_readable; use function iter\mapKeys; use function iter\toArrayWithKeys; @@ -288,8 +285,8 @@ private static function initStubFileName(): void private static function dumpPhar(string $file, string $tmp): void { $extractPharProcess = new Process([ - self::getPhpExecutable(), - self::getBoxBin(), + ExecutableFinder::findPhpExecutable(), + ExecutableFinder::findBoxExecutable(), 'extract', $file, $tmp, @@ -329,28 +326,6 @@ private static function loadDumpedPharFiles(string $tmp): array return [$meta, $dumpedFiles]; } - private static function getPhpExecutable(): string - { - if (isset(self::$phpExecutable)) { - return self::$phpExecutable; - } - - $phpExecutable = (new PhpExecutableFinder())->find(); - - if (false === $phpExecutable) { - throw new RuntimeException('Could not find a PHP executable.'); - } - - self::$phpExecutable = $phpExecutable; - - return self::$phpExecutable; - } - - private static function getBoxBin(): string - { - return getenv(Constants::BIN) ?: $_SERVER['SCRIPT_NAME']; - } - /** * @param array $filesMeta */ From e833954f12603f5c4f60f4ba41a3b0aaf44f8113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:41:18 +0100 Subject: [PATCH 16/21] fix: Fix invalid usage of non-existing constant (#1187) --- src/Console/Command/Compile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Console/Command/Compile.php b/src/Console/Command/Compile.php index 8d5f3c208..cbb7207e6 100644 --- a/src/Console/Command/Compile.php +++ b/src/Console/Command/Compile.php @@ -37,6 +37,7 @@ use KevinGH\Box\Configuration\Configuration; use KevinGH\Box\Console\Logger\CompilerLogger; use KevinGH\Box\Console\MessageRenderer; +use KevinGH\Box\Constants; use KevinGH\Box\MapFile; use KevinGH\Box\Phar\CompressionAlgorithm; use KevinGH\Box\Phar\SigningAlgorithm; @@ -73,7 +74,6 @@ use function Safe\getcwd; use function sprintf; use function var_export; -use const KevinGH\Box\BOX_ALLOW_XDEBUG; use const PHP_EOL; /** @@ -181,7 +181,7 @@ public function getConfiguration(): CommandConfiguration public function execute(IO $io): int { if ($io->getTypedOption(self::NO_RESTART_OPTION)->asBoolean()) { - putenv(BOX_ALLOW_XDEBUG.'=1'); + putenv(Constants::ALLOW_XDEBUG.'=1'); } $debug = $io->getTypedOption(self::DEBUG_OPTION)->asBoolean(); From 31f3bf03ca3226515c0fb7b1136e022265e10c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 09:51:12 +0100 Subject: [PATCH 17/21] ci: Fix the requirement checker PR creation (#1191) This task now requires explicit write permissions for pull requests. --- .github/workflows/requirement-checker.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/requirement-checker.yaml b/.github/workflows/requirement-checker.yaml index 718b1fc9f..bdf341ec9 100644 --- a/.github/workflows/requirement-checker.yaml +++ b/.github/workflows/requirement-checker.yaml @@ -279,6 +279,8 @@ jobs: name: Update the RequirementChecker if: ${{ github.repository == 'box-project/box' && github.ref_name == 'main' }} runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 From e0c5508a5c203b441c0ea360bbda9457d86f0881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 10:08:34 +0100 Subject: [PATCH 18/21] refactor: Move the bump of the file descriptor limit to a dedicated class (#1189) --- src/Console/Command/Compile.php | 6 +- src/Console/OpenFileDescriptorLimiter.php | 98 +++++++++++++++++++++++ src/functions.php | 66 --------------- 3 files changed, 101 insertions(+), 69 deletions(-) create mode 100644 src/Console/OpenFileDescriptorLimiter.php diff --git a/src/Console/Command/Compile.php b/src/Console/Command/Compile.php index cbb7207e6..5272aab63 100644 --- a/src/Console/Command/Compile.php +++ b/src/Console/Command/Compile.php @@ -37,6 +37,7 @@ use KevinGH\Box\Configuration\Configuration; use KevinGH\Box\Console\Logger\CompilerLogger; use KevinGH\Box\Console\MessageRenderer; +use KevinGH\Box\Console\OpenFileDescriptorLimiter; use KevinGH\Box\Constants; use KevinGH\Box\MapFile; use KevinGH\Box\Phar\CompressionAlgorithm; @@ -62,7 +63,6 @@ use function implode; use function is_callable; use function is_string; -use function KevinGH\Box\bump_open_file_descriptor_limit; use function KevinGH\Box\check_php_settings; use function KevinGH\Box\disable_parallel_processing; use function KevinGH\Box\format_size; @@ -221,7 +221,7 @@ public function execute(IO $io): int // Adding files might result in opening a lot of files. Either because not parallelized or when creating the // workers for parallelization. // As a result, we bump the file descriptor to an arbitrary number to ensure this process can run correctly - $restoreLimit = bump_open_file_descriptor_limit(2048, $io); + $restoreLimit = OpenFileDescriptorLimiter::bumpLimit(2048, $io); try { $box = $this->createPhar($config, $logger, $io, $debug); @@ -721,7 +721,7 @@ private static function configureCompressionAlgorithm( ), ); - $restoreLimit = bump_open_file_descriptor_limit(count($box), $io); + $restoreLimit = OpenFileDescriptorLimiter::bumpLimit(count($box), $io); try { $extension = $box->compress($algorithm); diff --git a/src/Console/OpenFileDescriptorLimiter.php b/src/Console/OpenFileDescriptorLimiter.php new file mode 100644 index 000000000..e2d887ed4 --- /dev/null +++ b/src/Console/OpenFileDescriptorLimiter.php @@ -0,0 +1,98 @@ + + * Théo Fidry + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace KevinGH\Box\Console; + +use Closure; +use Fidry\Console\IO; +use KevinGH\Box\NotInstantiable; +use Symfony\Component\Console\Output\OutputInterface; +use function function_exists; +use function posix_getrlimit; +use function posix_setrlimit; +use function sprintf; +use const POSIX_RLIMIT_INFINITY; +use const POSIX_RLIMIT_NOFILE; + +/** + * @internal + */ +final class OpenFileDescriptorLimiter +{ + use NotInstantiable; + + private const LIMIT_MARGIN = 128; + + /** + * Bumps the maximum number of open file descriptor if necessary. + * + * @return Closure Callable to call to restore the original maximum number of open files descriptors + */ + public static function bumpLimit(int $count, IO $io): Closure + { + $count += self::LIMIT_MARGIN; // Add a little extra for good measure + + if (false === function_exists('posix_getrlimit') || false === function_exists('posix_setrlimit')) { + $io->writeln( + '[debug] Could not check the maximum number of open file descriptors: the functions "posix_getrlimit()" and ' + .'"posix_setrlimit" could not be found.', + OutputInterface::VERBOSITY_DEBUG, + ); + + // TODO: loverage noop + return static function (): void {}; + } + + $softLimit = posix_getrlimit()['soft openfiles']; + $hardLimit = posix_getrlimit()['hard openfiles']; + + if ($softLimit >= $count) { + return static function (): void {}; + } + + $io->writeln( + sprintf( + '[debug] Increased the maximum number of open file descriptors from ("%s", "%s") to ("%s", "%s")' + .'', + $softLimit, + $hardLimit, + $count, + 'unlimited', + ), + OutputInterface::VERBOSITY_DEBUG, + ); + + posix_setrlimit( + POSIX_RLIMIT_NOFILE, + $count, + 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, + ); + + return static function () use ($io, $softLimit, $hardLimit): void { + // TODO: this check looks redundant + if (function_exists('posix_setrlimit') && isset($softLimit, $hardLimit)) { + posix_setrlimit( + POSIX_RLIMIT_NOFILE, + $softLimit, + 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, + ); + + $io->writeln( + '[debug] Restored the maximum number of open file descriptors', + OutputInterface::VERBOSITY_DEBUG, + ); + } + }; + } +} diff --git a/src/functions.php b/src/functions.php index 6b8f05019..58d4ef84f 100644 --- a/src/functions.php +++ b/src/functions.php @@ -22,7 +22,6 @@ use Phar; use Symfony\Component\Console\Helper\Helper; use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Output\OutputInterface; use Webmozart\Assert\Assert; use function bin2hex; use function class_alias; @@ -31,18 +30,13 @@ use function define; use function defined; use function floor; -use function function_exists; use function is_float; use function is_int; use function log; use function number_format; -use function posix_getrlimit; -use function posix_setrlimit; use function random_bytes; use function sprintf; use function str_replace; -use const POSIX_RLIMIT_INFINITY; -use const POSIX_RLIMIT_NOFILE; /** * @private @@ -241,63 +235,3 @@ static function (int $code, string $message, string $file = '', int $line = -1): }, ); } - -/** - * Bumps the maximum number of open file descriptor if necessary. - * - * @return Closure callable to call to restore the original maximum number of open files descriptors - */ -function bump_open_file_descriptor_limit(int $count, IO $io): Closure -{ - $count += 128; // Add a little extra for good measure - - if (false === function_exists('posix_getrlimit') || false === function_exists('posix_setrlimit')) { - $io->writeln( - '[debug] Could not check the maximum number of open file descriptors: the functions "posix_getrlimit()" and ' - .'"posix_setrlimit" could not be found.', - OutputInterface::VERBOSITY_DEBUG, - ); - - return static function (): void {}; - } - - $softLimit = posix_getrlimit()['soft openfiles']; - $hardLimit = posix_getrlimit()['hard openfiles']; - - if ($softLimit >= $count) { - return static function (): void {}; - } - - $io->writeln( - sprintf( - '[debug] Increased the maximum number of open file descriptors from ("%s", "%s") to ("%s", "%s")' - .'', - $softLimit, - $hardLimit, - $count, - 'unlimited', - ), - OutputInterface::VERBOSITY_DEBUG, - ); - - posix_setrlimit( - POSIX_RLIMIT_NOFILE, - $count, - 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, - ); - - return static function () use ($io, $softLimit, $hardLimit): void { - if (function_exists('posix_setrlimit') && isset($softLimit, $hardLimit)) { - posix_setrlimit( - POSIX_RLIMIT_NOFILE, - $softLimit, - 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, - ); - - $io->writeln( - '[debug] Restored the maximum number of open file descriptors', - OutputInterface::VERBOSITY_DEBUG, - ); - } - }; -} From f1523761a9eec0a68f0a73208f03cf7512e29edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 10:27:08 +0100 Subject: [PATCH 19/21] refactor: Remove redundant checks in OpenFileDescriptorLimiter (#1192) --- src/Console/OpenFileDescriptorLimiter.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Console/OpenFileDescriptorLimiter.php b/src/Console/OpenFileDescriptorLimiter.php index e2d887ed4..ed888b809 100644 --- a/src/Console/OpenFileDescriptorLimiter.php +++ b/src/Console/OpenFileDescriptorLimiter.php @@ -80,19 +80,16 @@ public static function bumpLimit(int $count, IO $io): Closure ); return static function () use ($io, $softLimit, $hardLimit): void { - // TODO: this check looks redundant - if (function_exists('posix_setrlimit') && isset($softLimit, $hardLimit)) { - posix_setrlimit( - POSIX_RLIMIT_NOFILE, - $softLimit, - 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, - ); + posix_setrlimit( + POSIX_RLIMIT_NOFILE, + $softLimit, + 'unlimited' === $hardLimit ? POSIX_RLIMIT_INFINITY : $hardLimit, + ); - $io->writeln( - '[debug] Restored the maximum number of open file descriptors', - OutputInterface::VERBOSITY_DEBUG, - ); - } + $io->writeln( + '[debug] Restored the maximum number of open file descriptors', + OutputInterface::VERBOSITY_DEBUG, + ); }; } } From 65cd2df9250e262116799458d904aaea4867461b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:16:04 +0100 Subject: [PATCH 20/21] refactor: Move noop() into a class (#1193) --- src/Console/OpenFileDescriptorLimiter.php | 6 +-- src/Console/PharInfoRenderer.php | 4 +- src/Noop.php | 42 ++++++++++++++++ src/functions.php | 9 ---- tests/BoxTest.php | 60 +++++++++++------------ 5 files changed, 77 insertions(+), 44 deletions(-) create mode 100644 src/Noop.php diff --git a/src/Console/OpenFileDescriptorLimiter.php b/src/Console/OpenFileDescriptorLimiter.php index ed888b809..bded877e8 100644 --- a/src/Console/OpenFileDescriptorLimiter.php +++ b/src/Console/OpenFileDescriptorLimiter.php @@ -16,6 +16,7 @@ use Closure; use Fidry\Console\IO; +use KevinGH\Box\Noop; use KevinGH\Box\NotInstantiable; use Symfony\Component\Console\Output\OutputInterface; use function function_exists; @@ -50,15 +51,14 @@ public static function bumpLimit(int $count, IO $io): Closure OutputInterface::VERBOSITY_DEBUG, ); - // TODO: loverage noop - return static function (): void {}; + return Noop::create(); } $softLimit = posix_getrlimit()['soft openfiles']; $hardLimit = posix_getrlimit()['hard openfiles']; if ($softLimit >= $count) { - return static function (): void {}; + return Noop::create(); } $io->writeln( diff --git a/src/Console/PharInfoRenderer.php b/src/Console/PharInfoRenderer.php index d895cc85c..14559216c 100644 --- a/src/Console/PharInfoRenderer.php +++ b/src/Console/PharInfoRenderer.php @@ -17,6 +17,7 @@ use Closure; use DateTimeImmutable; use Fidry\Console\IO; +use KevinGH\Box\Noop; use KevinGH\Box\NotInstantiable; use KevinGH\Box\Phar\CompressionAlgorithm; use KevinGH\Box\Phar\PharInfo; @@ -36,7 +37,6 @@ use function is_array; use function KevinGH\Box\format_size; use function KevinGH\Box\format_size as format_size1; -use function KevinGH\Box\noop; use function key; use function preg_match; use function round; @@ -61,7 +61,7 @@ public static function renderShortSummary( IO $io, ?Closure $separator = null, ): void { - $separator ??= noop(); + $separator ??= Noop::create(); $methods = [ self::renderCompression(...), diff --git a/src/Noop.php b/src/Noop.php new file mode 100644 index 000000000..3a7a12ebd --- /dev/null +++ b/src/Noop.php @@ -0,0 +1,42 @@ + + * Théo Fidry + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace KevinGH\Box; + +use Closure; + +/** + * @private + */ +final class Noop +{ + use NotInstantiable; + + /** + * @var Closure():void + */ + private static Closure $noop; + + /** + * @return Closure():void + */ + public static function create(): Closure + { + if (!isset(self::$noop)) { + self::$noop = static function (): void {}; + } + + return self::$noop; + } +} diff --git a/src/functions.php b/src/functions.php index 58d4ef84f..fdebab218 100644 --- a/src/functions.php +++ b/src/functions.php @@ -14,7 +14,6 @@ namespace KevinGH\Box; -use Closure; use Composer\InstalledVersions; use ErrorException; use Fidry\Console\IO; @@ -212,14 +211,6 @@ function check_php_settings(IO $io): void ))->check(); } -/** - * @private - */ -function noop(): Closure -{ - return static function (): void {}; -} - /** * Converts errors to exceptions. * diff --git a/tests/BoxTest.php b/tests/BoxTest.php index 17fd294b4..6a9ec29e4 100644 --- a/tests/BoxTest.php +++ b/tests/BoxTest.php @@ -110,7 +110,7 @@ public function test_it_cannot_start_the_buffering_if_it_is_already_started(): v public function test_it_cannot_end_the_buffering_if_it_is_already_ended(): void { try { - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); self::fail('Expected exception to be thrown.'); } catch (InvalidArgumentException $exception) { @@ -121,10 +121,10 @@ public function test_it_cannot_end_the_buffering_if_it_is_already_ended(): void } $this->box->startBuffering(); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); try { - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); self::fail('Expected exception to be thrown.'); } catch (InvalidArgumentException $exception) { @@ -144,7 +144,7 @@ public function test_it_can_add_a_file_to_the_phar(): void $this->box->startBuffering(); $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -159,7 +159,7 @@ public function test_it_can_add_a_file_to_the_phar(): void public function test_it_ensures_a_phar_cannot_be_empty(): void { $this->box->startBuffering(); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedPharPath = 'phar://test.phar/.box_empty'; @@ -173,7 +173,7 @@ public function test_it_can_add_a_file_to_the_phar_in_a_new_buffering_process_do $this->box->startBuffering(); $this->box->addFile($file0, $file0Contents); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $file0Contents; $expectedPharPath = 'phar://test.phar/'.$file0; @@ -189,7 +189,7 @@ public function test_it_can_add_a_file_to_the_phar_in_a_new_buffering_process_do $this->box->startBuffering(); $this->box->addFile($file1, $file1Contents); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $file1Contents; $expectedPharPath = 'phar://test.phar/'.$file1; @@ -227,7 +227,7 @@ public function test_it_can_add_a_non_existent_file_with_contents_to_the_phar(): $this->box->startBuffering(); $this->box->addFile($file, $contents); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -248,7 +248,7 @@ public function test_it_can_add_an_existent_file_with_contents_to_the_phar(): vo $this->box->startBuffering(); $this->box->addFile($file, $contents); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -267,7 +267,7 @@ public function test_it_can_add_a_non_existent_bin_file_with_contents_to_the_pha $this->box->startBuffering(); $this->box->addFile($file, $contents, true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -288,7 +288,7 @@ public function test_it_can_add_an_existent_bin_file_with_contents_to_the_phar() $this->box->startBuffering(); $this->box->addFile($file, $contents, true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -310,7 +310,7 @@ public function test_it_can_add_a_file_with_absolute_path_to_the_phar(): void $this->box->startBuffering(); $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$relativePath; @@ -341,7 +341,7 @@ public function test_it_can_add_a_file_with_a_local_path_to_the_phar(): void $this->box->startBuffering(); $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$localPath; @@ -364,7 +364,7 @@ public function test_it_can_add_a_binary_file_to_the_phar(): void $this->box->startBuffering(); $this->box->addFile($file, null, true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$file; @@ -395,7 +395,7 @@ public function test_it_can_add_a_binary_file_with_a_local_path_to_the_phar(): v $this->box->startBuffering(); $this->box->addFile($file, null, true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $contents; $expectedPharPath = 'phar://test.phar/'.$localPath; @@ -440,7 +440,7 @@ public function test_it_compacts_the_file_content_and_replace_placeholders_befor $this->box->startBuffering(); $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $secondCompactorOutput; $expectedPharPath = 'phar://test.phar/'.$file; @@ -479,7 +479,7 @@ public function test_it_maps_the_file_before_adding_it_to_the_phar(): void $this->box->startBuffering(); $local = $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); self::assertSame($expectedLocal, $local); @@ -525,7 +525,7 @@ public function test_it_cannot_add_an_unreadable_file(): void try { $this->box->startBuffering(); $this->box->addFile($file); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); self::fail('Expected exception to be thrown.'); } catch (InvalidArgumentException $exception) { @@ -568,7 +568,7 @@ public function test_it_compacts_the_contents_before_adding_it_to_the_phar(): vo $this->box->startBuffering(); $this->box->addFile($file, $contents); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expectedContents = $secondCompactorOutput; $expectedPharPath = 'phar://test.phar/'.$file; @@ -596,7 +596,7 @@ public function test_it_can_add_files_to_the_phar(): void $this->box->startBuffering(); $this->box->addFiles(['foo', 'bar'], false); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { $expectedContents = $contents; @@ -643,7 +643,7 @@ public function test_it_can_add_files_with_absolute_path_to_the_phar(): void $this->box->startBuffering(); $this->box->addFiles([$f1, $f2], false); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { $expectedContents = $contents; @@ -685,7 +685,7 @@ public function test_it_can_add_files_with_a_local_path_to_the_phar(): void $this->box->startBuffering(); $this->box->addFiles(['foo', 'bar'], false); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $item) { $expectedContents = $item['contents']; @@ -781,7 +781,7 @@ public function test_it_can_remove_the_composer_files(): void $this->box->startBuffering(); $this->box->addFiles(array_keys($files), true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { self::assertFileExists('phar://test.phar/'.$file); @@ -814,7 +814,7 @@ public function test_it_can_remove_the_composer_files_with_a_custom_vendor_direc $this->box->startBuffering(); $this->box->addFiles(array_keys($files), true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { self::assertFileExists('phar://test.phar/'.$file); @@ -850,7 +850,7 @@ public function test_it_can_remove_the_composer_files_mapped_with_a_different_pa $this->box->startBuffering(); $this->box->addFiles(array_keys($files), true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { self::assertFileExists('phar://test.phar/lib/'.$file); @@ -919,7 +919,7 @@ public function test_it_can_add_binary_files_to_the_phar(): void $this->box->startBuffering(); $this->box->addFiles(['foo', 'bar'], true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $contents) { $expectedContents = $contents; @@ -961,7 +961,7 @@ public function test_it_can_add_binary_files_with_a_local_path_to_the_phar(): vo $this->box->startBuffering(); $this->box->addFiles(['foo', 'bar'], true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $file => $item) { $expectedContents = $item['contents']; @@ -998,7 +998,7 @@ public function test_it_compacts_the_files_contents_and_replace_placeholders_bef $this->box->startBuffering(); $this->box->addFiles(array_keys($files), false); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); $expected = [ 'foo' => 'foo_value', @@ -1041,7 +1041,7 @@ public function test_it_maps_the_files_before_adding_it_to_the_phar(): void $this->box->startBuffering(); $this->box->addFiles(array_keys($files), true); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); foreach ($files as $expectedLocal) { self::assertFileExists( @@ -1365,7 +1365,7 @@ public function test_it_compresses_all_the_files_with_the_given_algorithm(): voi PHP, ); - $this->box->endBuffering(noop()); + $this->box->endBuffering(Noop::create()); self::assertCount(2, $this->box); From b17f5ee4f5f5ec9104204e3c6b2323340ffe7ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:50:05 +0100 Subject: [PATCH 21/21] refactor: Move PHP settings checker into a class (#1188) --- src/Console/Command/Compile.php | 4 ++-- src/Console/Command/Extract.php | 4 ++-- src/Console/Command/Process.php | 4 ++-- src/Console/PhpSettingsChecker.php | 37 ++++++++++++++++++++++++++++++ src/functions.php | 15 ------------ 5 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 src/Console/PhpSettingsChecker.php diff --git a/src/Console/Command/Compile.php b/src/Console/Command/Compile.php index 5272aab63..871b8f32a 100644 --- a/src/Console/Command/Compile.php +++ b/src/Console/Command/Compile.php @@ -38,6 +38,7 @@ use KevinGH\Box\Console\Logger\CompilerLogger; use KevinGH\Box\Console\MessageRenderer; use KevinGH\Box\Console\OpenFileDescriptorLimiter; +use KevinGH\Box\Console\PhpSettingsChecker; use KevinGH\Box\Constants; use KevinGH\Box\MapFile; use KevinGH\Box\Phar\CompressionAlgorithm; @@ -63,7 +64,6 @@ use function implode; use function is_callable; use function is_string; -use function KevinGH\Box\check_php_settings; use function KevinGH\Box\disable_parallel_processing; use function KevinGH\Box\format_size; use function KevinGH\Box\format_time; @@ -190,7 +190,7 @@ public function execute(IO $io): int $io->setVerbosity(OutputInterface::VERBOSITY_DEBUG); } - check_php_settings($io); + PhpSettingsChecker::check($io); if ($io->getTypedOption(self::NO_PARALLEL_PROCESSING_OPTION)->asBoolean()) { disable_parallel_processing(); diff --git a/src/Console/Command/Extract.php b/src/Console/Command/Extract.php index 0770d9d4a..0d0d999c9 100644 --- a/src/Console/Command/Extract.php +++ b/src/Console/Command/Extract.php @@ -19,6 +19,7 @@ use Fidry\Console\ExitCode; use Fidry\Console\IO; use Fidry\FileSystem\FS; +use KevinGH\Box\Console\PhpSettingsChecker; use KevinGH\Box\Phar\InvalidPhar; use KevinGH\Box\Phar\PharFactory; use KevinGH\Box\Phar\PharMeta; @@ -28,7 +29,6 @@ use Throwable; use function bin2hex; use function file_exists; -use function KevinGH\Box\check_php_settings; use function realpath; use function sprintf; use const DIRECTORY_SEPARATOR; @@ -76,7 +76,7 @@ public function getConfiguration(): Configuration public function execute(IO $io): int { - check_php_settings($io); + PhpSettingsChecker::check($io); $pharPath = self::getPharFilePath($io); $outputDir = $io->getTypedArgument(self::OUTPUT_ARG)->asNonEmptyString(); diff --git a/src/Console/Command/Process.php b/src/Console/Command/Process.php index 775358fe8..473fbf50d 100644 --- a/src/Console/Command/Process.php +++ b/src/Console/Command/Process.php @@ -25,6 +25,7 @@ use KevinGH\Box\Compactor\PhpScoper; use KevinGH\Box\Compactor\Placeholder; use KevinGH\Box\Configuration\Configuration; +use KevinGH\Box\Console\PhpSettingsChecker; use stdClass; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; @@ -38,7 +39,6 @@ use function explode; use function getcwd; use function implode; -use function KevinGH\Box\check_php_settings; use function putenv; use function sprintf; use const KevinGH\Box\BOX_ALLOW_XDEBUG; @@ -89,7 +89,7 @@ public function execute(IO $io): int putenv(BOX_ALLOW_XDEBUG.'=1'); } - check_php_settings($io); + PhpSettingsChecker::check($io); ChangeWorkingDirOption::changeWorkingDirectory($io); diff --git a/src/Console/PhpSettingsChecker.php b/src/Console/PhpSettingsChecker.php new file mode 100644 index 000000000..54908a792 --- /dev/null +++ b/src/Console/PhpSettingsChecker.php @@ -0,0 +1,37 @@ + + * Théo Fidry + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace KevinGH\Box\Console; + +use Fidry\Console\IO; +use KevinGH\Box\Console\Php\PhpSettingsHandler; +use KevinGH\Box\NotInstantiable; +use Symfony\Component\Console\Logger\ConsoleLogger; + +/** + * @internal + */ +final class PhpSettingsChecker +{ + use NotInstantiable; + + public static function check(IO $io): void + { + (new PhpSettingsHandler( + new ConsoleLogger( + $io->getOutput(), + ), + ))->check(); + } +} diff --git a/src/functions.php b/src/functions.php index fdebab218..a328137e8 100644 --- a/src/functions.php +++ b/src/functions.php @@ -16,11 +16,8 @@ use Composer\InstalledVersions; use ErrorException; -use Fidry\Console\IO; -use KevinGH\Box\Console\Php\PhpSettingsHandler; use Phar; use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Logger\ConsoleLogger; use Webmozart\Assert\Assert; use function bin2hex; use function class_alias; @@ -199,18 +196,6 @@ function unique_id(string $prefix): string return $prefix.bin2hex(random_bytes(6)); } -/** - * @private - */ -function check_php_settings(IO $io): void -{ - (new PhpSettingsHandler( - new ConsoleLogger( - $io->getOutput(), - ), - ))->check(); -} - /** * Converts errors to exceptions. *