diff --git a/.github/actions/restore-docker-cache/action.yml b/.github/actions/restore-docker-cache/action.yml new file mode 100644 index 00000000..33732f9b --- /dev/null +++ b/.github/actions/restore-docker-cache/action.yml @@ -0,0 +1,31 @@ +name: Restore Docker Image Cache +description: Restores or builds docker image cache for a given PHP version +inputs: + php-version: + description: "PHP version to build/load the docker image for" + required: true +runs: + using: composite + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Restore Docker image cache + uses: actions/cache@v3 + id: cache-docker + with: + path: qit-cli-tests-${{ inputs.php-version }}.tar + key: ${{ runner.os }}-qit-cli-tests-${{ inputs.php-version }}-${{ hashFiles('_build/docker/php/**') }} + + - name: Build Docker image if needed + if: steps.cache-docker.outputs.cache-hit != 'true' + run: | + docker build --build-arg CI=true --build-arg PHP_VERSION=${{ inputs.php-version }} -t qit-cli-tests:${{ inputs.php-version }} ./_build/docker/php + docker save qit-cli-tests:${{ inputs.php-version }} -o qit-cli-tests-${{ inputs.php-version }}.tar + shell: bash + + - name: Load Docker image from cache + if: steps.cache-docker.outputs.cache-hit == 'true' + run: | + docker load -i qit-cli-tests-${{ inputs.php-version }}.tar + shell: bash diff --git a/.github/workflows/code-tests.yml b/.github/workflows/code-tests.yml index 0d07ea12..86d2ca5f 100644 --- a/.github/workflows/code-tests.yml +++ b/.github/workflows/code-tests.yml @@ -1,30 +1,43 @@ name: QIT CLI Code tests on: - workflow_call: - push: + pull_request: paths: - 'src/**.php' + workflow_dispatch: + +concurrency: + group: code-tests-${{ github.ref }} + cancel-in-progress: true + jobs: code_tests: - name: Code tests runs-on: ubuntu-20.04 steps: - name: Checkout code uses: actions/checkout@v4 - - uses: actions/cache@v3 + + - name: Restore Docker Cache (default PHP 8.3) + uses: ./.github/actions/restore-docker-cache + with: + php-version: "8.3" + + - name: Cache composer dependencies + uses: actions/cache@v3 id: cache-composer with: path: src/vendor key: ${{ runner.os }}-${{ hashFiles('src/composer.lock') }} + - name: Composer install if: steps.cache-composer.outputs.cache-hit != 'true' working-directory: src run: composer install + - name: Run PHPCS run: make phpcs + - name: Run PHPStan run: make phpstan + - name: Run Phan run: make phan - - name: Run PHPUnit - run: make phpunit diff --git a/.github/workflows/phan.yml b/.github/workflows/phan.yml index 0d839281..66962008 100644 --- a/.github/workflows/phan.yml +++ b/.github/workflows/phan.yml @@ -3,10 +3,42 @@ on: pull_request: paths: - 'src/**.php' + workflow_dispatch: + +concurrency: + group: phan-tests-${{ github.ref }} + cancel-in-progress: true jobs: phan_tests: runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + steps: - - name: Echo Bogus - run: echo "Bogus workflow to allow PR-based testing." + - name: Checkout code + uses: actions/checkout@v4 + + - name: Restore Docker Cache + uses: ./.github/actions/restore-docker-cache + with: + php-version: ${{ matrix.php }} + + - name: Cache composer dependencies + uses: actions/cache@v3 + id: cache-composer + with: + path: src/vendor + key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('src/composer.lock') }} + + - name: Composer install + if: steps.cache-composer.outputs.cache-hit != 'true' + run: | + cd src + composer install --no-interaction --no-suggest --prefer-dist + + - name: Run Phan + env: + PHP_VERSION: ${{ matrix.php }} + run: make phan diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 0e64a70b..250b5c00 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -3,10 +3,42 @@ on: pull_request: paths: - 'src/**.php' + workflow_dispatch: + +concurrency: + group: phpunit-tests-${{ github.ref }} + cancel-in-progress: true jobs: phpunit_tests: runs-on: ubuntu-latest + strategy: + matrix: + php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] + steps: - - name: Echo Bogus - run: echo "Bogus workflow to allow PR-based testing." + - name: Checkout code + uses: actions/checkout@v4 + + - name: Restore Docker Cache + uses: ./.github/actions/restore-docker-cache + with: + php-version: ${{ matrix.php }} + + - name: Cache composer dependencies + uses: actions/cache@v3 + id: cache-composer + with: + path: src/vendor + key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('src/composer.lock') }} + + - name: Composer install + if: steps.cache-composer.outputs.cache-hit != 'true' + run: | + cd src + composer install --no-interaction --no-suggest --prefer-dist + + - name: Run PHPUnit tests + env: + PHP_VERSION: ${{ matrix.php }} + run: make phpunit diff --git a/.github/workflows/restore-docker-cache.yml b/.github/workflows/restore-docker-cache.yml new file mode 100644 index 00000000..aa668030 --- /dev/null +++ b/.github/workflows/restore-docker-cache.yml @@ -0,0 +1,32 @@ +name: Restore Docker Image Cache +on: + workflow_call: + inputs: + php-version: + required: true + type: string + +jobs: + restore-docker-cache: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Restore Docker image cache + uses: actions/cache@v3 + id: cache-docker + with: + path: qit-cli-tests-${{ inputs.php-version }}.tar + key: ${{ runner.os }}-qit-cli-tests-${{ inputs.php-version }}-${{ hashFiles('_build/docker/php/**') }} + + - name: Build Docker image if needed + if: steps.cache-docker.outputs.cache-hit != 'true' + run: | + docker build --build-arg CI=true --build-arg PHP_VERSION=${{ inputs.php-version }} -t qit-cli-tests:${{ inputs.php-version }} ./_build/docker/php + docker save qit-cli-tests:${{ inputs.php-version }} -o qit-cli-tests-${{ inputs.php-version }}.tar + + - name: Load Docker image from cache + if: steps.cache-docker.outputs.cache-hit == 'true' + run: | + docker load -i qit-cli-tests-${{ inputs.php-version }}.tar diff --git a/Makefile b/Makefile index 9c1d1c3b..f4cf7baf 100644 --- a/Makefile +++ b/Makefile @@ -8,26 +8,37 @@ DEBUG ?= 0 ARGS ?= VERSION ?= qit_dev_build +# List all PHP versions you want to test/build images for: +PHP_VERSIONS = 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +# Default PHP version used if none specified +PHP_VERSION ?= 8.3 + ifeq (1, $(ROOT)) DOCKER_USER ?= "0:0" else DOCKER_USER ?= "$(shell id -u):$(shell id -g)" endif -## Run a command inside an alpine PHP 8 CLI image. -## 1. Command to execute, eg: "./vendor/bin/phpcs" 2. Working dir (optional) +## Run a command inside a PHP CLI Docker image built for a specific PHP_VERSION. +## 1. Command to execute, e.g.: "php /app/src/vendor/bin/phpcs" +## 2. Working dir (optional) define execPhpAlpine - @docker image inspect qit-cli-php-xdebug-pcntl > /dev/null 2>&1 || docker build --build-arg CI=${CI} -t qit-cli-php-xdebug-pcntl ./_build/docker/php83 - docker run --rm \ - --user $(DOCKER_USER) \ - -v "${PWD}:/app" \ - -v "${PWD}/_build/docker/php83/ini/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini" \ - --env QIT_HOME=/tmp \ - --env PHP_IDE_CONFIG=serverName=qit_cli \ - --workdir "$(2:=/)" \ - --add-host host.docker.internal:host-gateway \ - qit-cli-php-xdebug-pcntl \ - bash -c "php -d xdebug.start_with_request=$(if $(filter 1,$(DEBUG)),yes,no) -d memory_limit=1G $(1)" + @docker image inspect qit-cli-tests:$(PHP_VERSION) > /dev/null 2>&1 || \ + (echo "Docker image not found. Building qit-cli-tests:$(PHP_VERSION)..." && \ + docker build --build-arg CI=${CI} --build-arg PHP_VERSION=$(PHP_VERSION) -t qit-cli-tests:$(PHP_VERSION) ./_build/docker/php) + + @docker run --rm \ + --user $(DOCKER_USER) \ + -v "${PWD}:/app" \ + -v "${PWD}/_build/docker/php/ini/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini" \ + --env QIT_HOME=/tmp \ + --env PHP_IDE_CONFIG=serverName=qit_cli \ + --env TARGET_PHP_VERSION=$(PHP_VERSION) \ + --env PHAN_DISABLE_XDEBUG_WARN=1 \ + --env PHAN_ALLOW_XDEBUG=1 \ + --workdir "$(2:=/)" \ + qit-cli-tests:$(PHP_VERSION) \ + bash -c "$(1)" endef watch: @@ -44,14 +55,11 @@ build: composer \ install --no-dev --quiet --optimize-autoloader --ignore-platform-reqs - # Create a temporary configuration file with the specified VERSION @sed "s/QIT_VERSION_REPLACE/$(VERSION)/g" ./_build/box.json.dist > ./_build/box.json - # Ensure the Docker image is built and run Box with the temporary configuration file @docker images -q | grep qit-cli-box || docker build -t qit-cli-box ./_build/docker/box @docker run --rm -v ${PWD}:${PWD} -w ${PWD} -u "$(shell id -u):$(shell id -g)" qit-cli-box ./_build/box.phar compile -c ./_build/box.json --no-parallel || rm -rf src-tmp - # Clean up the temporary directory and configuration file @rm -rf src-tmp @rm -f ./_build/box.json @@ -61,22 +69,51 @@ tests: $(MAKE) phpunit $(MAKE) phan +tests-all: + $(MAKE) phpcs + $(MAKE) phpstan + $(MAKE) phpunit-all + $(MAKE) phan-all + phpcbf: - $(call execPhpAlpine,/app/src/vendor/bin/phpcbf /app/src/qit-cli.php /app/src/src -s --standard=/app/src/.phpcs.xml.dist) + $(call execPhpAlpine,php /app/src/vendor/bin/phpcbf /app/src/qit-cli.php /app/src/src -s --standard=/app/src/.phpcs.xml.dist) phpcs: $(MAKE) phpcbf || true - $(call execPhpAlpine,/app/src/vendor/bin/phpcs /app/src/qit-cli.php /app/src/src -s --standard=/app/src/.phpcs.xml.dist) + $(call execPhpAlpine,php /app/src/vendor/bin/phpcs /app/src/qit-cli.php /app/src/src -s --standard=/app/src/.phpcs.xml.dist) +# Added --memory-limit=1G here phpstan: - $(call execPhpAlpine,/app/src/vendor/bin/phpstan -vvv analyse -c /app/src/phpstan.neon) + $(call execPhpAlpine,php /app/src/vendor/bin/phpstan -vvv analyse -c /app/src/phpstan.neon --memory-limit=1G) phpunit: - $(call execPhpAlpine,/app/src/vendor/bin/phpunit -c /app/src/phpunit.xml.dist $(ARGS)) + $(call execPhpAlpine,php /app/src/vendor/bin/phpunit -c /app/src/phpunit.xml.dist $(ARGS),/app/src) + +phpunit-all: + @for ver in $(PHP_VERSIONS); do \ + echo "Running PHPUnit on PHP $$ver..."; \ + $(MAKE) phpunit PHP_VERSION=$$ver || exit 1; \ + done + +phan-all: + @for ver in $(PHP_VERSIONS); do \ + echo "Running Phan on PHP $$ver..."; \ + $(MAKE) phan PHP_VERSION=$$ver || exit 1; \ + done + +check-php-versions: + @for ver in $(PHP_VERSIONS); do \ + echo "Checking PHP version in qit-cli-tests:$$ver..."; \ + docker image inspect qit-cli-tests:$$ver >/dev/null 2>&1 || (echo "Image not found for $$ver, building..." && docker build --build-arg CI=${CI} --build-arg PHP_VERSION=$$ver -t qit-cli-tests:$$ver ./_build/docker/php); \ + docker run --rm qit-cli-tests:$$ver php -v; \ + echo "-----------------------------------"; \ + done + +rebuild-images: + @for ver in $(PHP_VERSIONS); do \ + echo "Rebuilding qit-cli-tests:$$ver..."; \ + docker build --no-cache --build-arg CI=${CI} --build-arg PHP_VERSION=$$ver -t qit-cli-tests:$$ver ./_build/docker/php || exit 1; \ + done phan: - docker run --rm \ - -v ${PWD}/src:/mnt/src \ - -u "$$(id -u):$$(id -g)" \ - phanphp/phan:latest $(ARGS) - # PS: To update Phan, run: docker image pull phanphp/phan:latest \ No newline at end of file + $(call execPhpAlpine,php -d xdebug.mode=off /app/src/vendor/bin/phan $(ARGS),/app/src) diff --git a/_build/docker/php/Dockerfile b/_build/docker/php/Dockerfile new file mode 100644 index 00000000..4e40ec5e --- /dev/null +++ b/_build/docker/php/Dockerfile @@ -0,0 +1,17 @@ +# Use an ARG for the PHP version. Default to 8.3 if not provided. +ARG PHP_VERSION=8.3 +FROM php:${PHP_VERSION}-cli + +ARG CI +RUN apt-get update \ + && apt-get install -y libzip-dev \ + && docker-php-ext-install zip pcntl \ + && docker-php-ext-enable zip pcntl + +# Install php-ast +RUN pecl install ast && docker-php-ext-enable ast + +# Install Xdebug only if not in CI environment and PHP major version >= 8 +RUN if [ "$CI" != "true" ] && [ "${PHP_VERSION%%.*}" -ge 8 ]; then \ + pecl install xdebug && docker-php-ext-enable xdebug; \ + fi diff --git a/_build/docker/php83/ini/xdebug.ini b/_build/docker/php/ini/xdebug.ini similarity index 83% rename from _build/docker/php83/ini/xdebug.ini rename to _build/docker/php/ini/xdebug.ini index fea14732..12208c65 100644 --- a/_build/docker/php83/ini/xdebug.ini +++ b/_build/docker/php/ini/xdebug.ini @@ -1,7 +1,7 @@ xdebug.client_host = host.docker.internal xdebug.client_port = 9003 -xdebug.output_dir = /app/_build/docker/php83/xdebug/output -xdebug.log = /app/_build/docker/php83/xdebug/xdebug.log +xdebug.output_dir = /app/_build/docker/php/xdebug/output +xdebug.log = /app/_build/docker/php/xdebug/xdebug.log # Enabled at runtime with DEBUG=1 xdebug.start_with_request = no diff --git a/_build/docker/php83/xdebug/.gitkeep b/_build/docker/php/xdebug/.gitkeep similarity index 100% rename from _build/docker/php83/xdebug/.gitkeep rename to _build/docker/php/xdebug/.gitkeep diff --git a/_build/docker/php83/xdebug/README.md b/_build/docker/php/xdebug/README.md similarity index 100% rename from _build/docker/php83/xdebug/README.md rename to _build/docker/php/xdebug/README.md diff --git a/_build/docker/php/xdebug/xdebug.log b/_build/docker/php/xdebug/xdebug.log new file mode 100644 index 00000000..e69de29b diff --git a/_build/docker/php83/Dockerfile b/_build/docker/php83/Dockerfile deleted file mode 100644 index 0676b6bb..00000000 --- a/_build/docker/php83/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM php:8.3-cli - -ARG CI - -RUN apt-get update \ - && apt-get install -y libzip-dev \ - && docker-php-ext-install zip \ - && docker-php-ext-enable zip \ - && docker-php-ext-install pcntl \ - && docker-php-ext-enable pcntl - -# Install Xdebug only if not in CI environment -RUN if [ "$CI" != "true" ]; then \ - pecl install xdebug && docker-php-ext-enable xdebug; \ - fi \ No newline at end of file diff --git a/qit b/qit index 531747c3..1195ea20 100755 Binary files a/qit and b/qit differ diff --git a/src/.phan/config.php b/src/.phan/config.php index 737b0805..2a41c1ca 100644 --- a/src/.phan/config.php +++ b/src/.phan/config.php @@ -50,7 +50,7 @@ // Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist. // (See `backward_compatibility_checks` for additional options) // Automatically inferred from composer.json requirement for "php" of "^7.2.5 | ^8" - 'target_php_version' => '7.2', + 'target_php_version' => getenv( 'TARGET_PHP_VERSION' ) ?: '7.2', // If enabled, missing properties will be created when // they are first seen. If false, we'll report an diff --git a/src/composer.json b/src/composer.json index d4055480..0b742f18 100644 --- a/src/composer.json +++ b/src/composer.json @@ -27,7 +27,7 @@ "symfony/console": "^5", "symfony/process": "^5", "symfony/filesystem": "^5", - "lucatume/di52": "^3", + "lucatume/di52": "^4", "stecman/symfony-console-completion": "^0.11.0", "composer/ca-bundle": "^1.4", "symfony/serializer": "^5", @@ -37,9 +37,10 @@ "require-dev": { "phpunit/phpunit": "^8", "phpstan/phpstan": "^1", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "dealerdirect/phpcodesniffer-composer-installer": "^1", "wp-coding-standards/wpcs": "dev-develop", "phpcompatibility/php-compatibility": "^9", - "spatie/phpunit-snapshot-assertions": "^3.0" + "spatie/phpunit-snapshot-assertions": "^3.0", + "phan/phan": "^5.4" } } diff --git a/src/composer.lock b/src/composer.lock index 80c7a09b..659c2f6a 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9e635ae6113c810bc73c47f103647982", + "content-hash": "186bd38aa16994a414f80e09889ba04e", "packages": [ { "name": "composer/ca-bundle", - "version": "1.5.2", + "version": "1.5.4", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/bc0593537a463e55cadf45fd938d23b75095b7e1", + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1", "shasum": "" }, "require": { @@ -64,7 +64,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.2" + "source": "https://github.com/composer/ca-bundle/tree/1.5.4" }, "funding": [ { @@ -80,7 +80,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T07:49:53+00:00" + "time": "2024-11-27T15:35:25+00:00" }, { "name": "graham-campbell/result-type", @@ -146,21 +146,21 @@ }, { "name": "lucatume/di52", - "version": "3.3.7", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/lucatume/di52.git", - "reference": "76c0c2ad0422ce595e2e38138456f3475888e32c" + "reference": "c629a194cde339bd09b97724ff96ae57be392e55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lucatume/di52/zipball/76c0c2ad0422ce595e2e38138456f3475888e32c", - "reference": "76c0c2ad0422ce595e2e38138456f3475888e32c", + "url": "https://api.github.com/repos/lucatume/di52/zipball/c629a194cde339bd09b97724ff96ae57be392e55", + "reference": "c629a194cde339bd09b97724ff96ae57be392e55", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=5.6", + "php": ">=7.1", "psr/container": "^1.0" }, "require-dev": { @@ -185,9 +185,9 @@ "description": "A PHP 5.6 compatible dependency injection container.", "support": { "issues": "https://github.com/lucatume/di52/issues", - "source": "https://github.com/lucatume/di52/tree/3.3.7" + "source": "https://github.com/lucatume/di52/tree/4.0.0" }, - "time": "2024-04-26T14:46:26+00:00" + "time": "2024-12-14T10:54:28+00:00" }, { "name": "phpoption/phpoption", @@ -363,16 +363,16 @@ }, { "name": "symfony/console", - "version": "v5.4.45", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "108d436c2af470858bdaba3257baab3a74172017" + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/108d436c2af470858bdaba3257baab3a74172017", - "reference": "108d436c2af470858bdaba3257baab3a74172017", + "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", "shasum": "" }, "require": { @@ -442,7 +442,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.45" + "source": "https://github.com/symfony/console/tree/v5.4.47" }, "funding": [ { @@ -458,20 +458,20 @@ "type": "tidelift" } ], - "time": "2024-10-08T07:27:17+00:00" + "time": "2024-11-06T11:30:55+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", "shasum": "" }, "require": { @@ -509,7 +509,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" }, "funding": [ { @@ -525,7 +525,7 @@ "type": "tidelift" } ], - "time": "2023-01-24T14:02:46+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/filesystem", @@ -620,8 +620,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -696,8 +696,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -774,8 +774,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -858,8 +858,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -932,8 +932,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1008,8 +1008,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1070,16 +1070,16 @@ }, { "name": "symfony/process", - "version": "v5.4.45", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4" + "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4", - "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4", + "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d", + "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d", "shasum": "" }, "require": { @@ -1112,7 +1112,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.45" + "source": "https://github.com/symfony/process/tree/v5.4.47" }, "funding": [ { @@ -1128,7 +1128,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-11-06T11:36:42+00:00" }, { "name": "symfony/serializer", @@ -1235,16 +1235,16 @@ }, { "name": "symfony/service-contracts", - "version": "v2.5.3", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" + "reference": "f37b419f7aea2e9abf10abd261832cace12e3300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f37b419f7aea2e9abf10abd261832cace12e3300", + "reference": "f37b419f7aea2e9abf10abd261832cace12e3300", "shasum": "" }, "require": { @@ -1298,7 +1298,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.4" }, "funding": [ { @@ -1314,20 +1314,20 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:04:16+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/string", - "version": "v5.4.45", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2" + "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/7f6807add88b1e2635f3c6de5e1ace631ed7cad2", - "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2", + "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", + "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", "shasum": "" }, "require": { @@ -1384,7 +1384,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.45" + "source": "https://github.com/symfony/string/tree/v5.4.47" }, "funding": [ { @@ -1400,7 +1400,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-11-10T20:33:58+00:00" }, { "name": "symfony/yaml", @@ -1563,37 +1563,266 @@ } ], "packages-dev": [ + { + "name": "composer/pcre", + "version": "2.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "ebb81df8f52b40172d14062ae96a06939d80a069" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/ebb81df8f52b40172d14062ae96a06939d80a069", + "reference": "ebb81df8f52b40172d14062ae96a06939d80a069", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/2.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:24:47+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-09-19T14:15:21+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1609,7 +1838,7 @@ }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -1633,10 +1862,10 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "doctrine/instantiator", @@ -1708,18 +1937,108 @@ ], "time": "2022-12-30T00:15:36+00:00" }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "microsoft/tolerant-php-parser", + "version": "v0.1.2", + "source": { + "type": "git", + "url": "https://github.com/microsoft/tolerant-php-parser.git", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/3eccfd273323aaf69513e2f1c888393f5947804b", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Microsoft\\PhpParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Lourens", + "email": "roblou@microsoft.com" + } + ], + "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", + "support": { + "issues": "https://github.com/microsoft/tolerant-php-parser/issues", + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.2" + }, + "time": "2022-10-05T17:30:19+00:00" + }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -1758,7 +2077,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -1766,7 +2085,138 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v4.5.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" + }, + "time": "2024-09-08T10:13:13+00:00" + }, + { + "name": "phan/phan", + "version": "5.4.5", + "source": { + "type": "git", + "url": "https://github.com/phan/phan.git", + "reference": "2b15302175931a0629a85c57d0c1f91d68b26a4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phan/phan/zipball/2b15302175931a0629a85c57d0c1f91d68b26a4d", + "reference": "2b15302175931a0629a85c57d0c1f91d68b26a4d", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0|^3.0", + "ext-filter": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.4", + "microsoft/tolerant-php-parser": "0.1.2", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.1.3", + "symfony/console": "^3.2|^4.0|^5.0|^6.0|^7.0", + "symfony/polyfill-mbstring": "^1.11.0", + "symfony/polyfill-php80": "^1.20.0", + "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.16+ is recommended.", + "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", + "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.", + "ext-var_representation": "Suggested for converting values to strings in issue messages" + }, + "bin": [ + "phan", + "phan_client", + "tocheckstyle" + ], + "type": "project", + "autoload": { + "psr-4": { + "Phan\\": "src/Phan" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + }, + { + "name": "Rasmus Lerdorf" + }, + { + "name": "Andrew S. Morrison" + } + ], + "description": "A static analyzer for PHP", + "keywords": [ + "analyzer", + "php", + "static", + "static analysis" + ], + "support": { + "issues": "https://github.com/phan/phan/issues", + "source": "https://github.com/phan/phan/tree/5.4.5" + }, + "time": "2024-08-13T21:41:35+00:00" }, { "name": "phar-io/manifest", @@ -2114,18 +2564,178 @@ ], "time": "2024-05-20T13:34:27+00:00" }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "77a32518733312af16a44300404e945338981de3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + }, + "time": "2022-03-15T21:29:03+00:00" + }, { "name": "phpstan/phpstan", - "version": "1.12.7", + "version": "1.12.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" + "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", + "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", "shasum": "" }, "require": { @@ -2170,7 +2780,7 @@ "type": "github" } ], - "time": "2024-10-18T11:12:07+00:00" + "time": "2024-11-28T22:13:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2471,16 +3081,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.40", + "version": "8.5.41", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "48ed828b72c35b38cdddcd9059339734cb06b3a7" + "reference": "d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/48ed828b72c35b38cdddcd9059339734cb06b3a7", - "reference": "48ed828b72c35b38cdddcd9059339734cb06b3a7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa", + "reference": "d843cb5bcf0bf9ae3484016444fe0c5b6ec7e4fa", "shasum": "" }, "require": { @@ -2491,7 +3101,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.2", @@ -2549,7 +3159,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.40" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.41" }, "funding": [ { @@ -2565,7 +3175,123 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:47:04+00:00" + "time": "2024-12-05T13:44:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sabre/event", + "version": "5.1.7", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/event.git", + "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/event/zipball/86d57e305c272898ba3c28e9bd3d65d5464587c2", + "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1||^3.63", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "type": "library", + "autoload": { + "files": [ + "lib/coroutine.php", + "lib/Loop/functions.php", + "lib/Promise/functions.php" + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "sabre/event is a library for lightweight event-based programming", + "homepage": "http://sabre.io/event/", + "keywords": [ + "EventEmitter", + "async", + "coroutine", + "eventloop", + "events", + "hooks", + "plugin", + "promise", + "reactor", + "signal" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2024-08-27T11:23:05+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -3351,16 +4077,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.3", + "version": "3.11.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079", + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079", "shasum": "" }, "require": { @@ -3427,7 +4153,7 @@ "type": "open_collective" } ], - "time": "2024-09-18T10:38:58+00:00" + "time": "2024-12-11T16:04:26+00:00" }, { "name": "theseer/tokenizer", @@ -3479,18 +4205,138 @@ ], "time": "2024-03-03T12:36:25+00:00" }, + { + "name": "tysonandre/var_representation_polyfill", + "version": "0.1.3", + "source": { + "type": "git", + "url": "https://github.com/TysonAndre/var_representation_polyfill.git", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.2.0|^8.0.0" + }, + "provide": { + "ext-var_representation": "*" + }, + "require-dev": { + "phan/phan": "^5.4.1", + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-var_representation": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, + "autoload": { + "files": [ + "src/var_representation.php" + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + } + ], + "description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export", + "keywords": [ + "var_export", + "var_representation" + ], + "support": { + "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" + }, + "time": "2022-08-31T12:59:22+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + }, { "name": "wp-coding-standards/wpcs", "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "2133137c33fa898df70b5f879a65d83af4dbb97d" + "reference": "9f9726a01a886b3dcced5327390470a56314aa56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/2133137c33fa898df70b5f879a65d83af4dbb97d", - "reference": "2133137c33fa898df70b5f879a65d83af4dbb97d", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9f9726a01a886b3dcced5327390470a56314aa56", + "reference": "9f9726a01a886b3dcced5327390470a56314aa56", "shasum": "" }, "require": { @@ -3544,7 +4390,7 @@ "type": "custom" } ], - "time": "2024-10-05T00:46:24+00:00" + "time": "2024-12-02T08:21:11+00:00" } ], "aliases": [], diff --git a/src/src/Commands/CustomTests/RunE2ECommand.php b/src/src/Commands/CustomTests/RunE2ECommand.php index d0de0b38..b557356c 100644 --- a/src/src/Commands/CustomTests/RunE2ECommand.php +++ b/src/src/Commands/CustomTests/RunE2ECommand.php @@ -361,7 +361,7 @@ private function handle_termination(): void { if ( function_exists( 'pcntl_signal' ) ) { $signal_handler = static function (): void { static::shutdown_test_run(); - exit; + exit( 0 ); }; pcntl_signal( SIGINT, $signal_handler ); pcntl_signal( SIGTERM, $signal_handler ); diff --git a/src/tests/Environment/ExtensionDownloaderTest.php b/src/tests/Environment/ExtensionDownloaderTest.php index 9c95232c..7920a6cb 100644 --- a/src/tests/Environment/ExtensionDownloaderTest.php +++ b/src/tests/Environment/ExtensionDownloaderTest.php @@ -82,12 +82,12 @@ protected function make_extension( string $type, ?string $slug = null, $source = public function test_categorize_extensions() { $plugins = [ - $this->make_extension( 'plugin', slug: 'plugin1' ), - $this->make_extension( 'plugin', slug: 'plugin2' ), + $this->make_extension( 'plugin', 'plugin1' ), + $this->make_extension( 'plugin', 'plugin2' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'theme1' ), - $this->make_extension( 'theme', slug: 'theme2' ), + $this->make_extension( 'theme', 'theme1' ), + $this->make_extension( 'theme', 'theme2' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); @@ -95,35 +95,24 @@ public function test_categorize_extensions() { public function test_numeric_extensions() { $plugins = [ - $this->make_extension( 'plugin', slug: 'plugin1', source: '123' ), - $this->make_extension( 'plugin', slug: 'plugin2', source: '456' ), + $this->make_extension( 'plugin', 'plugin1', '123' ), + $this->make_extension( 'plugin', 'plugin2', '456' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'theme1', source: '789' ), + $this->make_extension( 'theme', 'theme1', '789' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_valid_ur_extensions() { $plugins = [ - $this->make_extension( 'plugin', source: 'http://example.com/plugin.zip' ), - $this->make_extension( 'plugin', source: 'https://example.com/plugin2.zip' ), + $this->make_extension( 'plugin', null, 'http://example.com/plugin.zip' ), + $this->make_extension( 'plugin', null, 'https://example.com/plugin2.zip' ), ]; $themes = []; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } - /* - public function test_invalid_url_extensions() { - $plugins = [ - $this->make_extension( 'plugin', source: 'http://example.com/plugin' ), - $this->make_extension( 'plugin', source: 'https://example.com/plugin2.tar.gz' ), - ]; - $this->expectException( InvalidArgumentException::class ); - $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); - } - */ - public function test_file_path_extensions() { $plugin1 = sys_get_temp_dir() . '/plugin'; $plugin2 = sys_get_temp_dir() . '/plugin2.zip'; @@ -136,20 +125,20 @@ public function test_file_path_extensions() { $this->to_delete = [ $plugin1, $plugin2, $theme1, $theme2 ]; $plugins = [ - $this->make_extension( 'plugin', source: $plugin1 ), - $this->make_extension( 'plugin', source: $plugin2 ), + $this->make_extension( 'plugin', null, $plugin1 ), + $this->make_extension( 'plugin', null, $plugin2 ), ]; $themes = [ - $this->make_extension( 'theme', source: $theme1 ), - $this->make_extension( 'theme', source: $theme2 ), + $this->make_extension( 'theme', null, $theme1 ), + $this->make_extension( 'theme', null, $theme2 ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_github_repository_string() { $plugins = [ - $this->make_extension( 'plugin', source: 'user/repository' ), - $this->make_extension( 'plugin', source: 'user2/repo2#branch' ), + $this->make_extension( 'plugin', null, 'user/repository' ), + $this->make_extension( 'plugin', null, 'user2/repo2#branch' ), ]; $this->expectException( InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); @@ -157,10 +146,10 @@ public function test_github_repository_string() { public function test_SSH_url() { $plugins = [ - $this->make_extension( 'plugin', source: 'ssh://example.com/plugin' ), + $this->make_extension( 'plugin', null, 'ssh://example.com/plugin' ), ]; $themes = [ - $this->make_extension( 'theme', source: 'ssh://example.com/theme' ), + $this->make_extension( 'theme', null, 'ssh://example.com/theme' ), ]; $this->expectException( InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ); @@ -168,15 +157,15 @@ public function test_SSH_url() { public function test_mixed_valid_and_invalid_extensions() { $plugins = [ - $this->make_extension( 'plugin', source: 'plugin' ), - $this->make_extension( 'plugin', source: 'http://validurl.com/plugin.zip' ), - $this->make_extension( 'plugin', source: 'invalidurl.com' ), - $this->make_extension( 'plugin', source: 'user/repo' ), + $this->make_extension( 'plugin', null, 'plugin' ), + $this->make_extension( 'plugin', null, 'http://validurl.com/plugin.zip' ), + $this->make_extension( 'plugin', null, 'invalidurl.com' ), + $this->make_extension( 'plugin', null, 'user/repo' ), ]; $themes = [ - $this->make_extension( 'theme', source: 'theme' ), - $this->make_extension( 'theme', source: '123' ), - $this->make_extension( 'theme', source: 'ssh://example.com/theme' ), + $this->make_extension( 'theme', null, 'theme' ), + $this->make_extension( 'theme', null, '123' ), + $this->make_extension( 'theme', null, 'ssh://example.com/theme' ), ]; $this->expectException( InvalidArgumentException::class ); $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); @@ -186,25 +175,14 @@ public function test_empty_arrays() { $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( [], [], '/tmp/cache/' ) ); } - /* - public function test_non_zip_urls_in_mixed_scenarios() { - $plugins = [ - $this->make_extension( 'plugin', source: 'http://example.com/plugin' ), - $this->make_extension( 'plugin', source: 'https://example.com/plugin.zip' ), - ]; - $this->expectException( \InvalidArgumentException::class ); - $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); - } - */ - public function test_extensions_with_special_characters() { $plugins = [ - $this->make_extension( 'plugin', source: 'special_plugin@1.0' ), - $this->make_extension( 'plugin', source: 'another-plugin#version' ), + $this->make_extension( 'plugin', null, 'special_plugin@1.0' ), + $this->make_extension( 'plugin', null, 'another-plugin#version' ), ]; $themes = [ - $this->make_extension( 'theme', source: 'theme with spaces' ), - $this->make_extension( 'theme', source: 'theme_special*chars' ), + $this->make_extension( 'theme', null, 'theme with spaces' ), + $this->make_extension( 'theme', null, 'theme_special*chars' ), ]; $this->expectException( InvalidArgumentException::class ); $this->expectExceptionMessage( 'Could not find extension' ); @@ -213,22 +191,22 @@ public function test_extensions_with_special_characters() { public function test_long_extension_names() { $plugins = [ - $this->make_extension( 'plugin', slug: 'this-is-a-very-long-plugin-name-that-might-exceed-typical-limits' ), + $this->make_extension( 'plugin', 'this-is-a-very-long-plugin-name-that-might-exceed-typical-limits' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'this-is-a-very-long-theme-name-that-might-exceed-typical-limits' ), + $this->make_extension( 'theme', 'this-is-a-very-long-theme-name-that-might-exceed-typical-limits' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_duplicate_entries() { $plugins = [ - $this->make_extension( 'plugin', slug: 'duplicate-plugin' ), - $this->make_extension( 'plugin', slug: 'duplicate-plugin' ), + $this->make_extension( 'plugin', 'duplicate-plugin' ), + $this->make_extension( 'plugin', 'duplicate-plugin' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'duplicate-theme' ), - $this->make_extension( 'theme', slug: 'duplicate-theme' ), + $this->make_extension( 'theme', 'duplicate-theme' ), + $this->make_extension( 'theme', 'duplicate-theme' ), ]; $this->expectException( InvalidArgumentException::class ); $this->expectExceptionMessage( 'Duplicate extension found.' ); @@ -237,21 +215,21 @@ public function test_duplicate_entries() { public function test_extensions_with_dot() { $plugins = [ - $this->make_extension( 'plugin', slug: 'plugin-v1.2.3' ), - $this->make_extension( 'plugin', slug: 'plugin-v4.5.6' ), + $this->make_extension( 'plugin', 'plugin-v1.2.3' ), + $this->make_extension( 'plugin', 'plugin-v4.5.6' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'theme-v7.8.9' ), + $this->make_extension( 'theme', 'theme-v7.8.9' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_mixed_extension_types_in_single_array() { $plugins = [ - $this->make_extension( 'plugin', source: '123' ), - $this->make_extension( 'plugin', source: 'https://example.com/plugin.zip' ), - $this->make_extension( 'plugin', source: '/path/to/plugin' ), - $this->make_extension( 'plugin', source: 'user/repository' ), + $this->make_extension( 'plugin', null, '123' ), + $this->make_extension( 'plugin', null, 'https://example.com/plugin.zip' ), + $this->make_extension( 'plugin', null, '/path/to/plugin' ), + $this->make_extension( 'plugin', null, 'user/repository' ), ]; $this->expectException( \InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); @@ -259,12 +237,12 @@ public function test_mixed_extension_types_in_single_array() { public function test_custom_handler() { $plugins = [ - $this->make_extension( 'plugin', slug: 'foo-custom-1' ), - $this->make_extension( 'plugin', slug: 'foo-custom-2' ), + $this->make_extension( 'plugin', 'foo-custom-1' ), + $this->make_extension( 'plugin', 'foo-custom-2' ), ]; $themes = [ - $this->make_extension( 'theme', slug: 'foo-custom-theme-1' ), - $this->make_extension( 'theme', slug: 'foo-custom-theme-2' ), + $this->make_extension( 'theme', 'foo-custom-theme-1' ), + $this->make_extension( 'theme', 'foo-custom-theme-2' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } @@ -338,4 +316,4 @@ public function provider_invalid_slugs_from_file() { public function test_invalid_slugs_from_file( $slug ) { $this->assertFalse( ExtensionDownloader::is_valid_plugin_slug( $slug ) ); } -} +} \ No newline at end of file