From 7c25db1c805eb3052886fd1cd7ef6c3201f9903c Mon Sep 17 00:00:00 2001 From: Paulo Arromba <17236129+wavvves@users.noreply.github.com> Date: Fri, 21 Apr 2023 12:07:37 +0100 Subject: [PATCH] Add PHP 8.1/8.2 to unit testing matrix (https://github.com/woocommerce/woocommerce-blocks/pull/8757) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added PHP 8.1 to unit testing matrix * Refactor unit testing to match Gutenberg repo 🤞 * Removed Gutenberg reference from debug information * Updated image running phpunit binary * Reverted image running phpunit binary * Remove composer platform override * Bump @wordpress/env and include phpunit * Update phpunit and tests * Change prefix * Try admin context when install wc * try wc install * adjust phpunit config file * Updated phpunit.xml.dist, composer.json and package.json * Added PHP 8.1 to unit testing matrix * Refactor unit testing to match Gutenberg repo 🤞 * Removed Gutenberg reference from debug information * Updated image running phpunit binary * Reverted image running phpunit binary * Remove composer platform override * Bump @wordpress/env and include phpunit * Update phpunit and tests * Change prefix * Try admin context when install wc * try wc install * adjust phpunit config file * Updated phpunit.xml.dist, composer.json and package.json * Revert install changes * updated npm packages * updated composer lock * updated check assets flow * Updated check assets flow. Yaml file auto formatted. * Updated check assets flow. * Attempt at fixing E2E * Reverted setup permissions step * Add logging information to E2E * Reverted E2E test flow * test playwright perms fix * test e2e perms fix * test e2e perms fix * test e2e perms fix * test e2e perms fix * languages update & debug * languages update & debug * revert * force "@wordpress/env": "^4.9.0" on E2E * update package lock * update package lock --------- Co-authored-by: Mike Jolley Co-authored-by: Niels Lange --- .../workflows/check-modified-assets.yml | 147 ++-- .../.github/workflows/php-js-e2e-tests.yml | 296 +++---- .../.github/workflows/playwright.yml | 68 +- .../.github/workflows/unit-tests.yml | 269 +++---- plugins/woocommerce-blocks/.gitignore | 1 + plugins/woocommerce-blocks/composer.json | 6 +- plugins/woocommerce-blocks/composer.lock | 731 ++++++------------ plugins/woocommerce-blocks/docker-compose.yml | 2 +- plugins/woocommerce-blocks/package-lock.json | 262 ++----- plugins/woocommerce-blocks/package.json | 4 +- plugins/woocommerce-blocks/phpunit.xml.dist | 7 +- .../woocommerce-blocks/tests/bootstrap.php | 11 +- .../php/Utils/BlockTemplateUtilsTest.php | 12 +- 13 files changed, 729 insertions(+), 1087 deletions(-) diff --git a/plugins/woocommerce-blocks/.github/workflows/check-modified-assets.yml b/plugins/woocommerce-blocks/.github/workflows/check-modified-assets.yml index e80f5a2d1e0..65acba9f222 100644 --- a/plugins/woocommerce-blocks/.github/workflows/check-modified-assets.yml +++ b/plugins/woocommerce-blocks/.github/workflows/check-modified-assets.yml @@ -1,82 +1,91 @@ name: Check Modified Assets on: - pull_request: + pull_request: jobs: - build-trunk: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: trunk - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + build-trunk: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: trunk - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - - name: Install Node dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci --no-optional + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' - - name: Build Assets - run: npm run build:check-assets + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm install --no-optional --no-audit - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: assets-list - path: ./build/assets.json + - name: Build Assets + run: npm run build:check-assets - compare-assets-with-trunk: - needs: [build-trunk] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: assets-list + path: ./build/assets.json + + compare-assets-with-trunk: + needs: [ build-trunk ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' + - name: Build Assets + run: npm run build:check-assets - - name: Build Assets - run: npm run build:check-assets - - - name: Download assets (trunk) - uses: actions/download-artifact@v3 - with: - name: assets-list - path: assets-list - - name: Compare Assets - uses: ./.github/compare-assets - id: compare-assets - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' - compare: assets-list/assets.json - create-comment: false - - name: Append report - uses: ./.github/comments-aggregator - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' - section-id: compare-assets-with-trunk - content: ${{steps.compare-assets.outputs.comment}} + - name: Download assets (trunk) + uses: actions/download-artifact@v3 + with: + name: assets-list + path: assets-list + - name: Compare Assets + uses: ./.github/compare-assets + id: compare-assets + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + compare: assets-list/assets.json + create-comment: false + - name: Append report + uses: ./.github/comments-aggregator + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + section-id: compare-assets-with-trunk + content: ${{steps.compare-assets.outputs.comment}} diff --git a/plugins/woocommerce-blocks/.github/workflows/php-js-e2e-tests.yml b/plugins/woocommerce-blocks/.github/workflows/php-js-e2e-tests.yml index d639dff78bd..eb23d10fa1d 100644 --- a/plugins/woocommerce-blocks/.github/workflows/php-js-e2e-tests.yml +++ b/plugins/woocommerce-blocks/.github/workflows/php-js-e2e-tests.yml @@ -1,169 +1,175 @@ name: E2E tests on: - push: - branches: [trunk] - pull_request: + push: + branches: [trunk] + pull_request: jobs: - JSE2EWithGutenberg: - if: ${{ false }} # disable until we've fixed failing tests. - strategy: - fail-fast: false - matrix: - part: [1, 2, 3, 4, 5] - name: JavaScript E2E Tests (WP latest with Gutenberg plugin) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + JSE2EWithGutenberg: + if: ${{ false }} # disable until we've fixed failing tests. + strategy: + fail-fast: false + matrix: + part: [1, 2, 3, 4, 5] + name: JavaScript E2E Tests (WP latest with Gutenberg plugin) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' - - name: Install Node Dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci --no-optional + - name: Install Node Dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci --no-optional - - name: Build Assets - run: FORCE_REDUCED_MOTION=true npm run build:e2e-test + - name: Build Assets + run: FORCE_REDUCED_MOTION=true npm run build:e2e-test - - name: blocks.ini setup - run: | - echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = tests' > blocks.ini - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - name: blocks.ini setup + run: | + echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = tests' > blocks.ini + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - coverage: none - tools: composer + - uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + coverage: none + tools: composer - - name: Composer install - run: | - composer install - - name: E2E Tests (WP latest with Gutenberg plugin) - env: - WOOCOMMERCE_BLOCKS_PHASE: 3 - GUTENBERG_EDITOR_CONTEXT: 'gutenberg' - run: | - node ./bin/wp-env-with-gutenberg.js - npm run wp-env start - npm run wp-env:config && npx cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --listTests > ~/.jest-e2e-tests - npx cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --runInBand --runTestsByPath $( awk 'NR % 5 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) + - name: Composer install + run: | + composer install + - name: E2E Tests (WP latest with Gutenberg plugin) + env: + WOOCOMMERCE_BLOCKS_PHASE: 3 + GUTENBERG_EDITOR_CONTEXT: 'gutenberg' + run: | + node ./bin/wp-env-with-gutenberg.js + npm run wp-env start + npm run wp-env:config && npx cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --listTests > ~/.jest-e2e-tests + npx cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --runInBand --runTestsByPath $( awk 'NR % 5 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) - - name: Upload artifacts on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: e2e-with-gutenberg-test-report-${{matrix.part}} - path: reports/e2e + - name: Upload artifacts on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: e2e-with-gutenberg-test-report-${{matrix.part}} + path: reports/e2e - - name: Archive flaky tests report - uses: actions/upload-artifact@v3 - if: always() - with: - name: flaky-tests-report-${{ matrix.part }} - path: flaky-tests - if-no-files-found: ignore + - name: Archive flaky tests report + uses: actions/upload-artifact@v3 + if: always() + with: + name: flaky-tests-report-${{ matrix.part }} + path: flaky-tests + if-no-files-found: ignore + + JSE2ETests: + name: JavaScript E2E Tests (latest) + strategy: + fail-fast: false + matrix: + part: [1, 2, 3, 4, 5] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - JSE2ETests: - name: JavaScript E2E Tests (latest) - strategy: - fail-fast: false - matrix: - part: [1, 2, 3, 4, 5] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-modified-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-modified-build-${{ env.cache-name }}- + ${{ runner.os }}-modified-build- + ${{ runner.os }}-modified- - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: | + sed -i 's/"@wordpress\/env": ".*"/"@wordpress\/env": "^4.9.0"/' package.json + npm install --no-optional --no-audit - - name: Install Node Dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci --no-optional + - name: Build Assets + run: FORCE_REDUCED_MOTION=true npm run build:e2e-test - - name: Build Assets - run: FORCE_REDUCED_MOTION=true npm run build:e2e-test + - name: blocks.ini setup + run: | + echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = tests' > blocks.ini + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - - name: blocks.ini setup - run: | - echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = tests' > blocks.ini - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + coverage: none + tools: composer - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - coverage: none - tools: composer + - name: Composer install + run: | + composer install - - name: Composer install - run: | - composer install + - name: E2E Tests (WP latest) + env: + WOOCOMMERCE_BLOCKS_PHASE: 3 + run: | + npm run wp-env start + npm run wp-env:config && npx cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --listTests > ~/.jest-e2e-tests + npx cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --runInBand --runTestsByPath $( awk 'NR % 5 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) - - name: E2E Tests (WP latest) - env: - WOOCOMMERCE_BLOCKS_PHASE: 3 - run: | - npm run wp-env start - npm run wp-env:config && npx cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --listTests > ~/.jest-e2e-tests - npx cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --runInBand --runTestsByPath $( awk 'NR % 5 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) + - name: Upload artifacts on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: e2e-test-report-${{matrix.part}} + path: reports/e2e - - name: Upload artifacts on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: e2e-test-report-${{matrix.part}} - path: reports/e2e - - - name: Archive flaky tests report - uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 - if: always() - with: - name: flaky-tests-report-${{ matrix.part }} - path: flaky-tests - if-no-files-found: ignore + - name: Archive flaky tests report + uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 + if: always() + with: + name: flaky-tests-report-${{ matrix.part }} + path: flaky-tests + if-no-files-found: ignore diff --git a/plugins/woocommerce-blocks/.github/workflows/playwright.yml b/plugins/woocommerce-blocks/.github/workflows/playwright.yml index 0458ccae15b..d692e0fa692 100644 --- a/plugins/woocommerce-blocks/.github/workflows/playwright.yml +++ b/plugins/woocommerce-blocks/.github/workflows/playwright.yml @@ -2,7 +2,7 @@ name: Playwright Tests on: push: - branches: [trunk] + branches: [ trunk ] pull_request: jobs: @@ -11,21 +11,51 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: 'npm' # Cache npm dependencies - - name: Install dependencies - run: npm ci - - name: Load wp-env - run: npm run env:start - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test --config=tests/e2e-pw/playwright.config.ts - - uses: actions/upload-artifact@v3 - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - uses: actions/checkout@v3 + with: + ref: trunk + + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm install --no-optional --no-audit + + - name: Load wp-env + run: npm run env:start --update + + - name: Fix permissions # We need to figure this out https://github.com/WordPress/gutenberg/issues/22515#issuecomment-1308346256 + run: | + WP_ENV_DIR=$(npm run wp-env install-path --silent 2>&1 | head -1) + cd $WP_ENV_DIR + mkdir -p tests-WordPress/wp-content/languages tests-WordPress/wp-content/upgrade + chmod -R 767 tests-WordPress/wp-content/languages tests-WordPress/wp-content/upgrade + cd - + + - name: Install Playwright Browsers + run: npx playwright install --with-deps + + - name: Run Playwright tests + run: npx playwright test --config=tests/e2e-pw/playwright.config.ts + - uses: actions/upload-artifact@v3 + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/plugins/woocommerce-blocks/.github/workflows/unit-tests.yml b/plugins/woocommerce-blocks/.github/workflows/unit-tests.yml index be9e90bf70b..8ee113d6d03 100644 --- a/plugins/woocommerce-blocks/.github/workflows/unit-tests.yml +++ b/plugins/woocommerce-blocks/.github/workflows/unit-tests.yml @@ -1,163 +1,128 @@ -name: Unit tests +name: Unit Tests +# Since Unit Tests are required to pass for each PR, +# we cannot disable them for documentation-only changes. on: - push: - branches: [trunk] - pull_request: + pull_request: + push: + branches: [trunk] + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true jobs: - Setup: - runs-on: ubuntu-latest - name: Setup - steps: - - uses: actions/checkout@v3 + JSUnitTests: + name: JS Unit Tests + runs-on: ubuntu-latest + if: ${{ github.repository == 'WooCommerce/WooCommerce-Blocks' || github.event_name == 'pull_request' }} + + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + - name: Use desired version of NodeJS + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: npm - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' + - name: Npm install and build + run: | + npm ci --no-optional + FORCE_REDUCED_MOTION=true npm run build:e2e-test + + - name: blocks.ini setup + run: echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = test' > blocks.ini - - name: Install Node Dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci --no-optional + - name: Run JavaScript Unit tests + run: npm run test + + PHPUnitTests: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + timeout-minutes: 20 + if: ${{ github.repository == 'WooCommerce/WooCommerce-Blocks' || github.event_name == 'pull_request' }} + strategy: + fail-fast: true + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + - '8.2' + + env: + WP_ENV_PHP_VERSION: ${{ matrix.php }} + + steps: + - uses: actions/checkout@v3 - - name: Build Assets - run: FORCE_REDUCED_MOTION=true npm run build:e2e-test + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: npm + + ## + # This allows Composer dependencies to be installed using a single step. + # + # Since the tests are currently run within the Docker containers where the PHP version varies, + # the same PHP version needs to be configured for the action runner machine so that the correct + # dependency versions are installed and cached. + ## + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '${{ matrix.php }}' + ini-file: development + coverage: none + + # Ensure that Composer installs the correct versions of packages. + - name: Override PHP version in composer.json + run: | + composer config platform.php ${{ matrix.php }} + composer update - - name: Store Build Assets - uses: actions/upload-artifact@v3 - with: - name: build-assets - path: build/ + - name: Install npm dependencies + run: | + npm ci + npm run build + + - name: Docker debug information + run: | + docker -v + docker-compose -v + + - name: General debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + locale -a + + - name: Start Docker environment + run: npm run wp-env start --update - - name: Get Composer Cache Directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.0" # This is not the PHP version used to run the tests, that is set by wp-env - coverage: none - tools: composer + - name: Log running Docker containers + run: docker ps -a - - name: Composer install - run: composer install - - PHPUnitTests: - name: PHP ${{ matrix.php }} - needs: Setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [ '7.4', '8.0' ] - - steps: - - uses: actions/checkout@v3 - - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Download Build Assets - uses: actions/download-artifact@v3 - with: - name: build-assets - - - name: blocks.ini setup - run: echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = test' > blocks.ini - - - name: Get Composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Set up Composer caching - uses: actions/cache@v3 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Install PHP deps - run: composer install - - - name: Setup Permissions - run: | - mkdir -p ./wp-content/uploads/wc-logs - echo 'deny from all' > ./wp-content/uploads/wc-logs/.htaccess - chmod -R 777 ./ - - name: Run PHPUnit tests - run: | - JSON='{"phpVersion": "${{ matrix.php }}"}' - echo $JSON > .wp-env.override.json - npm run wp-env start --update - npm run test:php - - name: Run PHPUnit tests (WooCommerce Development Version) - run: | - JSON='{"plugins": [".","https://downloads.wordpress.org/plugin/woocommerce.zip"], "phpVersion": "${{ matrix.php }}"}' - echo $JSON > .wp-env.override.json - npm run wp-env stop - rm -rf /home/runner/wp-env/* - npm run wp-env start --update - npm run test:php - JSUnitTests: - name: JS Unit Tests - needs: Setup - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Download Build Assets - uses: actions/download-artifact@v3 - with: - name: build-assets - - - name: blocks.ini setup - run: echo -e 'woocommerce_blocks_phase = 3\nwoocommerce_blocks_env = test' > blocks.ini - - - name: Run JavaScript Unit tests - run: npm run test + - name: Docker container debug information + run: | + npm run wp-env run tests-mysql "mysql --version" + npm run wp-env run tests-wordpress "php --version" + npm run wp-env run tests-wordpress "php -m" + npm run wp-env run tests-wordpress "php -i" + npm run wp-env run tests-wordpress "locale -a" + + - name: Run PHPUnit tests + run: npm run test:php diff --git a/plugins/woocommerce-blocks/.gitignore b/plugins/woocommerce-blocks/.gitignore index 93ff32a3834..f865be23e4a 100644 --- a/plugins/woocommerce-blocks/.gitignore +++ b/plugins/woocommerce-blocks/.gitignore @@ -62,3 +62,4 @@ blocks.ini /.wp-env.override.json /eslint_report.json /storybook/dist +.phpunit.result.cache diff --git a/plugins/woocommerce-blocks/composer.json b/plugins/woocommerce-blocks/composer.json index 7ee5809857a..6e310f014ba 100644 --- a/plugins/woocommerce-blocks/composer.json +++ b/plugins/woocommerce-blocks/composer.json @@ -19,10 +19,10 @@ "automattic/jetpack-autoloader": "^2.9.1" }, "require-dev": { - "wp-phpunit/wp-phpunit": "^6.0", + "phpunit/phpunit": "^8", "woocommerce/woocommerce-sniffs": "0.1.3", "yoast/phpunit-polyfills": "^1.0", - "mockery/mockery": "^1.4", + "mockery/mockery": "^1", "wp-hooks/generator": "^0.9.0" }, "autoload": { @@ -50,7 +50,7 @@ }, "config": { "platform": { - "php": "7.4.32" + "php": "7.4.33" }, "allow-plugins": { "automattic/jetpack-autoloader": true, diff --git a/plugins/woocommerce-blocks/composer.lock b/plugins/woocommerce-blocks/composer.lock index a633cc79f9a..e5dab73afdb 100644 --- a/plugins/woocommerce-blocks/composer.lock +++ b/plugins/woocommerce-blocks/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": "8cd48e5f4e020a6a66b0e07c975678a0", + "content-hash": "259391d14275eb05fa1baf52f23ffbc5", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -212,27 +212,27 @@ "packages-dev": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.0", + "version": "v0.7.2", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "e8d808670b8f882188368faaf1144448c169c0b7" + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e8d808670b8f882188368faaf1144448c169c0b7", - "reference": "e8d808670b8f882188368faaf1144448c169c0b7", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3", - "squizlabs/php_codesniffer": "^2 || ^3 || 4.0.x-dev" + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" }, "type": "composer-plugin", "extra": { @@ -253,6 +253,10 @@ "email": "franck.nijhof@dealerdirect.com", "homepage": "http://www.frenck.nl", "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -264,6 +268,7 @@ "codesniffer", "composer", "installer", + "phpcbf", "phpcs", "plugin", "qa", @@ -278,7 +283,7 @@ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" }, - "time": "2020-06-25T14:57:39+00:00" + "time": "2022-02-04T12:51:07+00:00" }, { "name": "doctrine/instantiator", @@ -688,28 +693,29 @@ }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -741,26 +747,26 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2018-07-08T19:23:20+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -792,9 +798,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2018-07-08T19:19:57+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -917,16 +923,16 @@ }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.0", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f" + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", "shasum": "" }, "require": { @@ -934,10 +940,10 @@ "phpcompatibility/phpcompatibility-paragonie": "^1.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -961,13 +967,14 @@ "compatibility", "phpcs", "standards", + "static analysis", "wordpress" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" }, - "time": "2019-08-28T14:22:28+00:00" + "time": "2022-10-24T09:00:36+00:00" }, { "name": "phpdocumentor/reflection", @@ -1080,110 +1087,42 @@ }, "time": "2016-01-25T08:17:30+00:00" }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" - }, - "time": "2020-03-05T15:02:03+00:00" - }, { "name": "phpunit/php-code-coverage", - "version": "8.0.2", + "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", - "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.3", - "phpunit/php-file-iterator": "^3.0", - "phpunit/php-text-template": "^2.0", - "phpunit/php-token-stream": "^4.0", - "sebastian/code-unit-reverse-lookup": "^2.0", - "sebastian/environment": "^5.0", - "sebastian/version": "^3.0", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.0-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -1211,7 +1150,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/8.0.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, "funding": [ { @@ -1219,32 +1158,32 @@ "type": "github" } ], - "time": "2020-05-23T08:02:54+00:00" + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "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/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1271,7 +1210,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, "funding": [ { @@ -1279,97 +1218,26 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "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/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "php": ">=5.3.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -1393,40 +1261,34 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "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/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1452,7 +1314,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/2.1.3" }, "funding": [ { @@ -1460,7 +1322,7 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", @@ -1524,16 +1386,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.2.6", + "version": "8.5.33", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6" + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c6a9e4312e209e659f1fce3ce88dd197c2448f6", - "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { @@ -1544,34 +1406,28 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.5", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.3", - "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^8.0.2", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-invoker": "^3.0.2", - "phpunit/php-text-template": "^2.0.2", - "phpunit/php-timer": "^5.0.1", - "sebastian/code-unit": "^1.0.5", - "sebastian/comparator": "^4.0.3", - "sebastian/diff": "^4.0.1", - "sebastian/environment": "^5.1.2", - "sebastian/exporter": "^4.0.2", - "sebastian/global-state": "^4.0", - "sebastian/object-enumerator": "^4.0.2", - "sebastian/resource-operations": "^3.0.2", - "sebastian/type": "^2.1.1", - "sebastian/version": "^3.0.1" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0" + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*" + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -1579,13 +1435,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-master": "8.5-dev" } }, "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], "classmap": [ "src/" ] @@ -1610,19 +1463,23 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.2.6" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2020-07-13T17:55:55+00:00" + "time": "2023-02-27T13:04:50+00:00" }, { "name": "psr/log", @@ -1674,86 +1531,30 @@ }, "time": "2021-05-03T11:20:27+00:00" }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "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" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "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/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -1775,7 +1576,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/1.0.2" }, "funding": [ { @@ -1783,34 +1584,34 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1849,7 +1650,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -1857,33 +1658,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1915,7 +1716,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" }, "funding": [ { @@ -1923,27 +1724,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^7.5" }, "suggest": { "ext-posix": "*" @@ -1951,7 +1752,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1978,7 +1779,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, "funding": [ { @@ -1986,34 +1787,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -2048,14 +1849,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -2063,30 +1864,30 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "4.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72", - "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { - "php": "^7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -2094,7 +1895,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2119,36 +1920,42 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/master" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, - "time": "2020-02-07T06:11:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "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/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2170,7 +1977,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/3.0.4" }, "funding": [ { @@ -2178,32 +1985,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "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/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -2225,7 +2032,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/1.1.2" }, "funding": [ { @@ -2233,32 +2040,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "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/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2285,10 +2092,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", + "homepage": "http://www.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/3.0.1" }, "funding": [ { @@ -2296,32 +2103,29 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2343,7 +2147,7 @@ "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" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, "funding": [ { @@ -2351,32 +2155,32 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -2399,7 +2203,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" }, "funding": [ { @@ -2407,29 +2211,29 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2452,28 +2256,22 @@ "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/master" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -2509,14 +2307,15 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2022-06-18T07:21:10+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "theseer/tokenizer", @@ -2716,54 +2515,6 @@ ], "time": "2022-07-03T12:35:07+00:00" }, - { - "name": "wp-phpunit/wp-phpunit", - "version": "6.2.0", - "source": { - "type": "git", - "url": "https://github.com/wp-phpunit/wp-phpunit.git", - "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/3b7ab767dde017dec9327cc024e9f26fd776a57b", - "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b", - "shasum": "" - }, - "type": "library", - "autoload": { - "files": [ - "__loaded.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "Evan Mattson", - "email": "me@aaemnnost.tv" - }, - { - "name": "WordPress Community", - "homepage": "https://wordpress.org/about/" - } - ], - "description": "WordPress core PHPUnit library", - "homepage": "https://github.com/wp-phpunit", - "keywords": [ - "phpunit", - "test", - "wordpress" - ], - "support": { - "docs": "https://github.com/wp-phpunit/docs", - "issues": "https://github.com/wp-phpunit/issues", - "source": "https://github.com/wp-phpunit/wp-phpunit" - }, - "time": "2023-03-30T01:15:51+00:00" - }, { "name": "yoast/phpunit-polyfills", "version": "1.0.5", @@ -2836,7 +2587,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "7.4.32" + "php": "7.4.33" }, "plugin-api-version": "2.3.0" } diff --git a/plugins/woocommerce-blocks/docker-compose.yml b/plugins/woocommerce-blocks/docker-compose.yml index 2ada4bc8c7b..354073edd37 100644 --- a/plugins/woocommerce-blocks/docker-compose.yml +++ b/plugins/woocommerce-blocks/docker-compose.yml @@ -28,7 +28,7 @@ services: - WORDPRESS_DB_NAME - WORDPRESS_DB_USER - WORDPRESS_DB_PASSWORD - - WORDPRESS_TABLE_PREFIX=wp_test_ + - WORDPRESS_TABLE_PREFIX=wptests_ - WP_CORE_DIR=/var/www/html - WP_TESTS_DIR=/tmp/wordpress-tests-lib - WOO_VERSION diff --git a/plugins/woocommerce-blocks/package-lock.json b/plugins/woocommerce-blocks/package-lock.json index 160f587cb93..64f670cf923 100644 --- a/plugins/woocommerce-blocks/package-lock.json +++ b/plugins/woocommerce-blocks/package-lock.json @@ -111,7 +111,7 @@ "@wordpress/e2e-test-utils": "10.1.0", "@wordpress/e2e-tests": "4.6.0", "@wordpress/element": "4.20.0", - "@wordpress/env": "^4.9.0", + "@wordpress/env": "5.16.0", "@wordpress/html-entities": "3.24.0", "@wordpress/i18n": "4.24.0", "@wordpress/is-shallow-equal": "4.24.0", @@ -5997,9 +5997,10 @@ "peer": true }, "node_modules/@sindresorhus/is": { - "version": "2.1.1", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -16376,15 +16377,16 @@ } }, "node_modules/@wordpress/env": { - "version": "4.9.0", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-5.16.0.tgz", + "integrity": "sha512-zx6UO8PuJBrQ34cfeedK1HlGHLFaj7oWzTo9tTt+noB79Ttqc4+a0lYwDqBLLJhlHU+cWgcyOP2lB6TboXH0xA==", "dev": true, - "license": "GPL-2.0-or-later", "dependencies": { "chalk": "^4.0.0", "copy-dir": "^1.3.0", "docker-compose": "^0.22.2", "extract-zip": "^1.6.7", - "got": "^10.7.0", + "got": "^11.8.5", "inquirer": "^7.1.0", "js-yaml": "^3.13.1", "ora": "^4.0.2", @@ -21145,15 +21147,12 @@ } }, "node_modules/cacheable-lookup": { - "version": "2.0.1", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/keyv": "^3.1.1", - "keyv": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=10.6.0" } }, "node_modules/cacheable-request": { @@ -24411,14 +24410,18 @@ } }, "node_modules/decompress-response": { - "version": "5.0.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, - "license": "MIT", "dependencies": { - "mimic-response": "^2.0.0" + "mimic-response": "^3.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/dedent": { @@ -25438,8 +25441,8 @@ }, "node_modules/duplexer3": { "version": "0.1.4", - "devOptional": true, - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "optional": true }, "node_modules/duplexify": { "version": "3.7.1", @@ -28643,17 +28646,6 @@ "node": ">=12" } }, - "node_modules/github-label-sync/node_modules/@sindresorhus/is": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, "node_modules/github-label-sync/node_modules/ajv": { "version": "8.11.0", "dev": true, @@ -28669,14 +28661,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/github-label-sync/node_modules/cacheable-lookup": { - "version": "5.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.6.0" - } - }, "node_modules/github-label-sync/node_modules/commander": { "version": "6.2.1", "dev": true, @@ -28685,60 +28669,11 @@ "node": ">= 6" } }, - "node_modules/github-label-sync/node_modules/decompress-response": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/github-label-sync/node_modules/got": { - "version": "11.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, "node_modules/github-label-sync/node_modules/json-schema-traverse": { "version": "1.0.0", "dev": true, "license": "MIT" }, - "node_modules/github-label-sync/node_modules/mimic-response": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/github-slugger": { "version": "1.4.0", "dev": true, @@ -28928,44 +28863,30 @@ } }, "node_modules/got": { - "version": "10.7.0", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, - "license": "MIT", "dependencies": { - "@sindresorhus/is": "^2.0.0", - "@szmarczak/http-timer": "^4.0.0", + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", - "cacheable-lookup": "^2.0.0", - "cacheable-request": "^7.0.1", - "decompress-response": "^5.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^5.0.0", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", - "mimic-response": "^2.1.0", "p-cancelable": "^2.0.0", - "p-event": "^4.0.0", - "responselike": "^2.0.0", - "to-readable-stream": "^2.0.0", - "type-fest": "^0.10.0" + "responselike": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=10.19.0" }, "funding": { "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/got/node_modules/type-fest": { - "version": "0.10.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.10", "devOptional": true, @@ -38076,11 +37997,12 @@ } }, "node_modules/mimic-response": { - "version": "2.1.0", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -47508,14 +47430,6 @@ "node": ">=0.10.0" } }, - "node_modules/to-readable-stream": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/to-regex": { "version": "3.0.2", "dev": true, @@ -55066,7 +54980,9 @@ "peer": true }, "@sindresorhus/is": { - "version": "2.1.1", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true }, "@sinonjs/commons": { @@ -62485,14 +62401,16 @@ } }, "@wordpress/env": { - "version": "4.9.0", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-5.16.0.tgz", + "integrity": "sha512-zx6UO8PuJBrQ34cfeedK1HlGHLFaj7oWzTo9tTt+noB79Ttqc4+a0lYwDqBLLJhlHU+cWgcyOP2lB6TboXH0xA==", "dev": true, "requires": { "chalk": "^4.0.0", "copy-dir": "^1.3.0", "docker-compose": "^0.22.2", "extract-zip": "^1.6.7", - "got": "^10.7.0", + "got": "^11.8.5", "inquirer": "^7.1.0", "js-yaml": "^3.13.1", "ora": "^4.0.2", @@ -65764,12 +65682,10 @@ } }, "cacheable-lookup": { - "version": "2.0.1", - "dev": true, - "requires": { - "@types/keyv": "^3.1.1", - "keyv": "^4.0.0" - } + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true }, "cacheable-request": { "version": "7.0.2", @@ -67966,10 +67882,12 @@ "dev": true }, "decompress-response": { - "version": "5.0.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "requires": { - "mimic-response": "^2.0.0" + "mimic-response": "^3.1.0" } }, "dedent": { @@ -68663,7 +68581,7 @@ }, "duplexer3": { "version": "0.1.4", - "devOptional": true + "optional": true }, "duplexify": { "version": "3.7.1", @@ -70820,10 +70738,6 @@ "octonode": "^0.10.2" }, "dependencies": { - "@sindresorhus/is": { - "version": "4.6.0", - "dev": true - }, "ajv": { "version": "8.11.0", "dev": true, @@ -70834,45 +70748,13 @@ "uri-js": "^4.2.2" } }, - "cacheable-lookup": { - "version": "5.0.4", - "dev": true - }, "commander": { "version": "6.2.1", "dev": true }, - "decompress-response": { - "version": "6.0.0", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "got": { - "version": "11.8.3", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - } - }, "json-schema-traverse": { "version": "1.0.0", "dev": true - }, - "mimic-response": { - "version": "3.1.0", - "dev": true } } }, @@ -71002,30 +70884,22 @@ } }, "got": { - "version": "10.7.0", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "requires": { - "@sindresorhus/is": "^2.0.0", - "@szmarczak/http-timer": "^4.0.0", + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", - "cacheable-lookup": "^2.0.0", - "cacheable-request": "^7.0.1", - "decompress-response": "^5.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^5.0.0", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", - "mimic-response": "^2.1.0", "p-cancelable": "^2.0.0", - "p-event": "^4.0.0", - "responselike": "^2.0.0", - "to-readable-stream": "^2.0.0", - "type-fest": "^0.10.0" - }, - "dependencies": { - "type-fest": { - "version": "0.10.0", - "dev": true - } + "responselike": "^2.0.0" } }, "graceful-fs": { @@ -77388,7 +77262,9 @@ "dev": true }, "mimic-response": { - "version": "2.1.0", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true }, "min-document": { @@ -83789,10 +83665,6 @@ } } }, - "to-readable-stream": { - "version": "2.1.0", - "dev": true - }, "to-regex": { "version": "3.0.2", "dev": true, diff --git a/plugins/woocommerce-blocks/package.json b/plugins/woocommerce-blocks/package.json index 6a01adb3a8c..1c6c21a6823 100644 --- a/plugins/woocommerce-blocks/package.json +++ b/plugins/woocommerce-blocks/package.json @@ -86,7 +86,7 @@ "env:stop": "npm run wp-env stop", "test:help": "wp-scripts test-unit-js --help", "test:performance": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.performance.config.js -- performance", - "test:php": "npm run wp-env run phpunit '/var/www/html/wp-content/plugins/${PWD##*/}/vendor/bin/phpunit -c /var/www/html/wp-content/plugins/${PWD##*/}/phpunit.xml.dist'", + "test:php": "wp-env run tests-wordpress /var/www/html/wp-content/plugins/${PWD##*/}/vendor/bin/phpunit -c /var/www/html/wp-content/plugins/${PWD##*/}/phpunit.xml.dist", "test:update": "wp-scripts test-unit-js --updateSnapshot --config tests/js/jest.config.json", "test:watch": "npm run test -- --watch", "ts:check": "tsc --build", @@ -160,7 +160,7 @@ "@wordpress/e2e-test-utils": "10.1.0", "@wordpress/e2e-tests": "4.6.0", "@wordpress/element": "4.20.0", - "@wordpress/env": "^4.9.0", + "@wordpress/env": "5.16.0", "@wordpress/html-entities": "3.24.0", "@wordpress/i18n": "4.24.0", "@wordpress/is-shallow-equal": "4.24.0", diff --git a/plugins/woocommerce-blocks/phpunit.xml.dist b/plugins/woocommerce-blocks/phpunit.xml.dist index 9a78391084e..ee40bac1d41 100644 --- a/plugins/woocommerce-blocks/phpunit.xml.dist +++ b/plugins/woocommerce-blocks/phpunit.xml.dist @@ -1,11 +1,10 @@ - diff --git a/plugins/woocommerce-blocks/tests/bootstrap.php b/plugins/woocommerce-blocks/tests/bootstrap.php index 8e60dbd2ba7..e2f2c5aa291 100644 --- a/plugins/woocommerce-blocks/tests/bootstrap.php +++ b/plugins/woocommerce-blocks/tests/bootstrap.php @@ -1,4 +1,10 @@ get( \Automattic\WooCommerce\Blocks\Installer::class )->maybe_create_tables(); } -tests_add_filter( 'setup_theme', __NAMESPACE__ . '\\manually_install_plugins' ); +tests_add_filter( 'init', __NAMESPACE__ . '\\manually_install_plugins' ); // Start up the WP testing environment. require $_tests_dir . '/includes/bootstrap.php'; diff --git a/plugins/woocommerce-blocks/tests/php/Utils/BlockTemplateUtilsTest.php b/plugins/woocommerce-blocks/tests/php/Utils/BlockTemplateUtilsTest.php index f67e4eb41df..9dbdad5f82f 100644 --- a/plugins/woocommerce-blocks/tests/php/Utils/BlockTemplateUtilsTest.php +++ b/plugins/woocommerce-blocks/tests/php/Utils/BlockTemplateUtilsTest.php @@ -141,17 +141,19 @@ class BlockTemplateUtilsTest extends WP_UnitTestCase { * Test set_has_theme_file_if_fallback_is_available when the template file has no fallback. */ public function test_set_has_theme_file_if_fallback_is_available_no_fallback() { - $template_file = array( - 'slug' => 'single-product', - 'theme' => 'twentytwentytwo', + $query_result = array( + (object) array( + 'slug' => 'single-product', + 'theme' => 'twentytwentytwo', + ), ); - $query_result = (object) array( + $template_file = (object) array( 'slug' => 'archive-product', 'theme' => 'twentytwentytwo', ); - $this->assertFalse( BlockTemplateUtils::set_has_theme_file_if_fallback_is_available( $template_file, $query_result ) ); + $this->assertFalse( BlockTemplateUtils::set_has_theme_file_if_fallback_is_available( $query_result, $template_file ) ); } /**