diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 22aae818eee..dae2134fb39 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -6,9 +6,6 @@ contact_links: - name: ❓ Support Question url: https://woocommerce.com/document/woocommerce-self-service-guide/ about: If you have a question please see our docs or use our forums, helpdesk, or Slack community! - - name: WooCommerce Admin - url: https://github.com/woocommerce/woocommerce-admin - about: Please report issues for WooCommerce Admin (such as Analytics and Onboarding) directly to it's repository. - name: WooCommerce Blocks url: https://github.com/woocommerce/woocommerce-gutenberg-products-block about: Please report issues for WooCommerce Blocks directly to it's repository. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cc115054c3..2b54e225a1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] + php: [ '7.2', '7.3', '7.4', '8.0' ] wp: [ 'latest' ] include: - wp: nightly diff --git a/.github/workflows/pr-build-and-e2e-tests.yml b/.github/workflows/pr-build-and-e2e-tests.yml index bca7a1f990d..5cd8cde318d 100644 --- a/.github/workflows/pr-build-and-e2e-tests.yml +++ b/.github/workflows/pr-build-and-e2e-tests.yml @@ -5,6 +5,11 @@ jobs: name: Build zip for PR runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - name: Checkout code uses: actions/checkout@v2 @@ -78,7 +83,16 @@ jobs: E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }} E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }} run: pnpx wc-e2e test:e2e - + + - name: Archive E2E test screenshots + uses: actions/upload-artifact@v2 + if: always() + with: + name: E2E Screenshots + path: package/woocommerce/plugins/woocommerce/tests/e2e/screenshots + if-no-files-found: ignore + retention-days: 5 + api-tests-run: name: Runs API tests. runs-on: ubuntu-18.04 @@ -136,65 +150,65 @@ jobs: run: pnpx wc-api-tests test api k6-tests-run: - name: Runs k6 Performance tests - runs-on: ubuntu-18.04 - needs: [build] - steps: - - name: Create dirs. - run: | - mkdir -p code/woocommerce - mkdir -p package/woocommerce - mkdir -p tmp/woocommerce - mkdir -p node_modules - - name: Checkout code. - uses: actions/checkout@v2 - with: - path: package/woocommerce + name: Runs k6 Performance tests + runs-on: ubuntu-18.04 + needs: [build] + steps: + - name: Create dirs. + run: | + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules + - name: Checkout code. + uses: actions/checkout@v2 + with: + path: package/woocommerce - - name: Install PNPM and install dependencies - working-directory: package/woocommerce - run: | - npm install -g pnpm - pnpm install + - name: Install PNPM and install dependencies + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install - - name: Workaround to use initialization file with prepopulated data. - working-directory: package/woocommerce/plugins/woocommerce/tests/e2e/docker - run: | - cp init-sample-products.sh initialize.sh + - name: Workaround to use initialization file with prepopulated data. + working-directory: package/woocommerce/plugins/woocommerce/tests/e2e/docker + run: | + cp init-sample-products.sh initialize.sh - - name: Load docker images and start containers. - working-directory: package/woocommerce/plugins/woocommerce - run: pnpx wc-e2e docker:up + - name: Load docker images and start containers. + working-directory: package/woocommerce/plugins/woocommerce + run: pnpx wc-e2e docker:up - - name: Move current directory to code. We will install zip file in this dir later. - run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce + - name: Move current directory to code. We will install zip file in this dir later. + run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce - - name: Download WooCommerce ZIP. - uses: actions/download-artifact@v2 - with: - name: woocommerce - path: tmp + - name: Download WooCommerce ZIP. + uses: actions/download-artifact@v2 + with: + name: woocommerce + path: tmp - - name: Extract and replace WooCommerce zip. - working-directory: tmp - run: | - unzip woocommerce.zip -d woocommerce - mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ + - name: Extract and replace WooCommerce zip. + working-directory: tmp + run: | + unzip woocommerce.zip -d woocommerce + mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ - - name: Install dependencies again - working-directory: package/woocommerce - run: | - npm install -g pnpm - pnpm install + - name: Install dependencies again + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install - - name: Wait for the Docker container to be built - working-directory: package/woocommerce/plugins/woocommerce - run: pnpx wc-e2e docker:wait + - name: Wait for the Docker container to be built + working-directory: package/woocommerce/plugins/woocommerce + run: pnpx wc-e2e docker:wait - - name: Install k6 - run: | - curl https://github.com/grafana/k6/releases/download/v0.33.0/k6-v0.33.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 - - - name: Run k6 tests - run: | - ./k6 run package/woocommerce/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js + - name: Install k6 + run: | + curl https://github.com/grafana/k6/releases/download/v0.33.0/k6-v0.33.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 + + - name: Run k6 tests + run: | + ./k6 run package/woocommerce/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml index 942d36b7dfd..adbd5f276f8 100644 --- a/.github/workflows/pr-code-coverage.yml +++ b/.github/workflows/pr-code-coverage.yml @@ -19,6 +19,11 @@ jobs: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - name: Checkout code uses: actions/checkout@v2 with: diff --git a/.github/workflows/pr-code-sniff.yml b/.github/workflows/pr-code-sniff.yml index 4978488aefa..895bf331f13 100644 --- a/.github/workflows/pr-code-sniff.yml +++ b/.github/workflows/pr-code-sniff.yml @@ -11,6 +11,11 @@ jobs: timeout-minutes: 15 runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - name: Checkout code uses: actions/checkout@v2 with: diff --git a/.github/workflows/pr-project-label.yml b/.github/workflows/pr-project-label.yml index 53f07a1e9b3..11fc915ff68 100644 --- a/.github/workflows/pr-project-label.yml +++ b/.github/workflows/pr-project-label.yml @@ -9,6 +9,11 @@ jobs: label_project: runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - uses: actions/labeler@v3 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 97cf35a0676..18afd599b05 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -11,6 +11,11 @@ jobs: if: "${{ contains(github.event.label.name, 'run: smoke tests') }}" runs-on: ubuntu-18.04 steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - name: Create dirs. run: | mkdir -p code/woocommerce diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml index edde98d9fc5..ac5a5b8de58 100644 --- a/.github/workflows/pr-unit-tests.yml +++ b/.github/workflows/pr-unit-tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] + php: [ '7.2', '7.3', '7.4', '8.0' ] wp: [ "latest" ] include: - wp: nightly @@ -32,6 +32,11 @@ jobs: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.7.0 + with: + access_token: ${{ github.token }} + - name: Checkout code uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 4d379ba3764..f009b94ce03 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ Thumbs.db # IDE files .idea -.vscode/ +.vscode/* project.xml project.properties .project @@ -13,6 +13,9 @@ project.properties *.sublime-workspace .sublimelinterrc +# Excluded IDE Files for developer experience tooling within workspace +!.vscode/tasks.json + # Grunt none diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..309c50d8e8d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,29 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "command": "pnpm tsc -b tsconfig.base.json", + "type": "shell", + "problemMatcher": [ "$tsc" ], + "label": "Typescript compile", + "detail": "Run tsc against tsconfig.base.json", + "runOptions": { + "runOn": "default" + } + }, + { + "command": "pnpm tsc -b tsconfig.base.json --watch", + "type": "shell", + "problemMatcher": { + "base": "$tsc-watch", + "applyTo": "allDocuments" + }, + "isBackground": true, + "label": "Incremental Typescript compile", + "detail": "Incremental background type checks", + "runOptions": { + "runOn": "folderOpen" + } + } + ] +} diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index c932077615a..8affc6b777e 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -45,6 +45,21 @@ You might also want to run `pnpm start` to watch your CSS and JS changes if you You're now ready to develop! +### Typescript Checking + +Typescript is progressively being implemented in this repository, and you might come across some files that are `.ts` or `.tsx`. By default, a VSCode environment will run type checking on such files that are currently open. + +As of now, some parts of the codebase that were imported from the Woocommerce-Admin repository, into the `plugins/woocommerce-admin/client` directory, still fail Typescript checking. This has been scheduled on the team's backlog to be fixed. + +In order to run type checking across the entire repository, you can run this command in your shell, from the root of this repository: + +```sh +pnpm tsc -b tsconfig.base.json +``` + +For better developer experience, the folder `.vscode/tasks.json` has two VSCode tasks to run these commands automatically as well as to parse the output and highlight the errors in the `Problems` tab and in the file explorer pane. The first task runs it once, the second one runs it in the background upon saving of any modified files. This task is also automatically prompted by VSCode to be run upon opening the folder. + + ## Using Xdebug Please refer to [WP-ENV official README](https://github.com/WordPress/gutenberg/tree/master/packages/env#using-xdebug) section for setting up Xdebug. diff --git a/package.json b/package.json index 343635022c8..3f7f9789ea7 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,14 @@ "devDependencies": { "@automattic/nx-composer": "^0.1.0", "@nrwl/cli": "^13.3.4", - "@nrwl/linter": "^13.3.4", "@nrwl/devkit": "^13.1.4", + "@nrwl/linter": "^13.3.4", "@nrwl/tao": "13.3.4", "@nrwl/web": "^13.3.4", "@nrwl/workspace": "^13.3.4", "@types/node": "14.14.33", "@woocommerce/eslint-plugin": "workspace:*", + "@wordpress/eslint-plugin": "^11.0.0", "@wordpress/prettier-config": "^1.1.1", "chalk": "^4.1.2", "glob": "^7.2.0", diff --git a/packages/js/admin-e2e-tests/.eslintrc.js b/packages/js/admin-e2e-tests/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/admin-e2e-tests/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/admin-e2e-tests/package.json b/packages/js/admin-e2e-tests/package.json index 8a5daa0e0e6..be6a8efe6d2 100644 --- a/packages/js/admin-e2e-tests/package.json +++ b/packages/js/admin-e2e-tests/package.json @@ -37,6 +37,8 @@ "@types/puppeteer": "^5.4.5", "@typescript-eslint/eslint-plugin": "^5.14.0", "@woocommerce/api": "^0.2.0", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "jest-mock-extended": "^1.0.18", @@ -48,10 +50,11 @@ "access": "public" }, "scripts": { - "prepare": "pnpm run build", + "prepare": "pnpm run build", "build": "tsc --build", "start": "tsc --build --watch", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", + "lint": "eslint src", "prepack": "pnpm run clean && pnpm run build" } } diff --git a/packages/js/admin-e2e-tests/src/fixtures/plugins.ts b/packages/js/admin-e2e-tests/src/fixtures/plugins.ts index 001b68b1503..69594816ccf 100644 --- a/packages/js/admin-e2e-tests/src/fixtures/plugins.ts +++ b/packages/js/admin-e2e-tests/src/fixtures/plugins.ts @@ -47,7 +47,7 @@ async function deactivateAndDeletePlugin( pluginName: string ) { } export async function deactivateAndDeleteAllPlugins( except: string[] = [] ) { let plugins = await getPlugins(); - let skippedPlugins = []; + const skippedPlugins = []; const promises = []; for ( const plugin of plugins ) { const splitPluginName = plugin.plugin.split( '/' ); diff --git a/packages/js/admin-e2e-tests/src/sections/onboarding/ThemeSection.ts b/packages/js/admin-e2e-tests/src/sections/onboarding/ThemeSection.ts index b6bd2b9110f..8439fa01fc8 100644 --- a/packages/js/admin-e2e-tests/src/sections/onboarding/ThemeSection.ts +++ b/packages/js/admin-e2e-tests/src/sections/onboarding/ThemeSection.ts @@ -18,7 +18,9 @@ export class ThemeSection extends BasePage { const title = await waitForElementByText( 'h2', themeTitle ); const chooseButton = await title?.evaluateHandle( ( element ) => { const card = element.closest( '.components-card' ); - return Array.from( card?.querySelectorAll('button') || [] ).find( el => el.textContent === 'Choose'); + return Array.from( card?.querySelectorAll( 'button' ) || [] ).find( + ( el ) => el.textContent === 'Choose' + ); } ); if ( chooseButton ) { await chooseButton.asElement()?.click(); diff --git a/packages/js/api/README.md b/packages/js/api/README.md index b27722004cc..e014365465f 100644 --- a/packages/js/api/README.md +++ b/packages/js/api/README.md @@ -1,13 +1,21 @@ # WooCommerce API Client -An isometric API client for interacting with WooCommerce installations. Here are the current and planned +An API client for interacting with WooCommerce installations that works both in the browser and in Node environments. Here are the current and planned features: -- [x] TypeScript Definitions +- [x] TypeScript Definitions \* - [x] Axios API Client with support for OAuth & basic auth -- [x] Repositories to simplify interaction with basic data types +- [X] Partial support to Repositories, to simplify interaction with basic data types \* - [x] Service classes for common activities such as changing settings +_\* TypeScript Definitions and Repositories are currently only supported for [Products](https://woocommerce.github.io/woocommerce-rest-api-docs/#products), and partially supported for [Orders](https://woocommerce.github.io/woocommerce-rest-api-docs/#orders)._ + +## Differences from @woocommerce/woocomerce-rest-api + +WooCommerce has two API clients in JavaScript for interacting with a WooCommerce installation's RESTful API. This package, and the [@woocommerce/woocomerce-rest-api](https://www.npmjs.com/package/@woocommerce/woocommerce-rest-api) package. + +The main difference between them is the Repositories and the TypeScript definitions for the supported endpoints. When using Axios directly, as you can do with both libraries, you query the WooCommerce API in a raw object format, following the [API documentation](https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction) parameters. Comparatively, with the Repositories provided in this package, you have the parameters as properties of an object, which gives you the benefits of auto-complete and strict types, for instance. + ## Usage ```bash diff --git a/packages/js/bin/get-babel-config.js b/packages/js/bin/get-babel-config.js index e79bc306d07..b474321e9ae 100644 --- a/packages/js/bin/get-babel-config.js +++ b/packages/js/bin/get-babel-config.js @@ -12,56 +12,44 @@ const { options: babelDefaultConfig } = babel.loadPartialConfig( { } ); const plugins = babelDefaultConfig.plugins; if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) { - plugins.push( [ '@wordpress/babel-plugin-import-jsx-pragma', { - scopeVariable: 'createElement', - source: '@wordpress/element', - isDefault: false, - } ] ); + plugins.push( [ + '@wordpress/babel-plugin-import-jsx-pragma', + { + scopeVariable: 'createElement', + source: '@wordpress/element', + isDefault: false, + }, + ] ); } const overrideOptions = ( target, targetName, options ) => { if ( get( target, [ 'file', 'request' ] ) === targetName ) { - return [ targetName, Object.assign( - {}, - target.options, - options - ) ]; + return [ targetName, Object.assign( {}, target.options, options ) ]; } return target; }; const babelConfigs = { - main: Object.assign( - {}, - babelDefaultConfig, - { - plugins, - presets: map( - babelDefaultConfig.presets, - ( preset ) => overrideOptions( preset, '@babel/preset-env', { - modules: 'commonjs', - } ) - ), - } - ), - module: Object.assign( - {}, - babelDefaultConfig, - { - plugins: map( - plugins, - ( plugin ) => overrideOptions( plugin, '@babel/plugin-transform-runtime', { - useESModules: true, - } ) - ), - presets: map( - babelDefaultConfig.presets, - ( preset ) => overrideOptions( preset, '@babel/preset-env', { - modules: false, - } ) - ), - } - ), + main: Object.assign( {}, babelDefaultConfig, { + plugins, + presets: map( babelDefaultConfig.presets, ( preset ) => + overrideOptions( preset, '@babel/preset-env', { + modules: 'commonjs', + } ) + ), + } ), + module: Object.assign( {}, babelDefaultConfig, { + plugins: map( plugins, ( plugin ) => + overrideOptions( plugin, '@babel/plugin-transform-runtime', { + useESModules: true, + } ) + ), + presets: map( babelDefaultConfig.presets, ( preset ) => + overrideOptions( preset, '@babel/preset-env', { + modules: false, + } ) + ), + } ), }; function getBabelConfig( environment ) { diff --git a/packages/js/components/.eslintrc.js b/packages/js/components/.eslintrc.js new file mode 100644 index 00000000000..f740ae8d831 --- /dev/null +++ b/packages/js/components/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, + overrides: [ + { + files: [ + '**/stories/*.js', + '**/stories/*.jsx', + '**/docs/example.js', + ], + rules: { + 'import/no-unresolved': [ + 'warn', + { ignore: [ '@woocommerce/components' ] }, + ], + }, + }, + ], +}; diff --git a/packages/js/components/package.json b/packages/js/components/package.json index 2afb2c5e01a..b9ec712baa5 100644 --- a/packages/js/components/package.json +++ b/packages/js/components/package.json @@ -77,6 +77,7 @@ }, "devDependencies": { "@babel/core": "^7.17.5", + "@babel/runtime": "^7.17.2", "@storybook/addon-actions": "^6.4.0", "@storybook/addon-console": "^1.2.3", "@storybook/addon-controls": "^6.4.19", @@ -95,9 +96,11 @@ "@testing-library/user-event": "^13.5.0", "@woocommerce/style-build": "workspace:*", "@wordpress/browserslist-config": "^4.1.1", + "@wordpress/eslint-plugin": "^11.0.0", "@wordpress/scripts": "^12.6.1", "concurrently": "^7.0.0", "css-loader": "^3.6.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "postcss-loader": "^3.0.0", @@ -113,6 +116,7 @@ "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", + "lint": "eslint src --ext=js,ts,tsx", "prepack": "pnpm run clean && pnpm run build", "start": "concurrently \"tsc --build ./tsconfig.json --watch\" \"webpack --watch\"", "test": "pnpm run build && pnpm run test:nobuild", diff --git a/packages/js/csv-export/.eslintrc.js b/packages/js/csv-export/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/csv-export/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/csv-export/package.json b/packages/js/csv-export/package.json index 66bbe470672..50722c87690 100644 --- a/packages/js/csv-export/package.json +++ b/packages/js/csv-export/package.json @@ -32,12 +32,15 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/currency/.eslintrc.js b/packages/js/currency/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/currency/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/currency/package.json b/packages/js/currency/package.json index 5a722ecda5b..80661eca8bd 100644 --- a/packages/js/currency/package.json +++ b/packages/js/currency/package.json @@ -35,12 +35,15 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/customer-effort-score/.eslintrc.js b/packages/js/customer-effort-score/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/customer-effort-score/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/customer-effort-score/package.json b/packages/js/customer-effort-score/package.json index 815d224c8ac..c1bd32fd97c 100644 --- a/packages/js/customer-effort-score/package.json +++ b/packages/js/customer-effort-score/package.json @@ -41,8 +41,10 @@ "@types/wordpress__components": "^9.8.6", "@woocommerce/style-build": "workspace:*", "@wordpress/browserslist-config": "^4.1.1", + "@wordpress/eslint-plugin": "^11.0.0", "concurrently": "^7.0.0", "css-loader": "^3.6.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "postcss-loader": "^3.0.0", @@ -64,6 +66,7 @@ "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/data/.eslintrc.js b/packages/js/data/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/data/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/data/package.json b/packages/js/data/package.json index 300bf010057..1308e6827d0 100644 --- a/packages/js/data/package.json +++ b/packages/js/data/package.json @@ -43,9 +43,12 @@ }, "devDependencies": { "@babel/core": "^7.17.5", + "@babel/runtime": "^7.17.2", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^7.0.2", "@types/wordpress__data-controls": "^2.2.0", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", @@ -63,6 +66,7 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/date/.eslintrc.js b/packages/js/date/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/date/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/date/package.json b/packages/js/date/package.json index 87da51dbced..eb6240d2f7c 100644 --- a/packages/js/date/package.json +++ b/packages/js/date/package.json @@ -28,7 +28,9 @@ }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", "d3-time-format": "^2.3.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", @@ -46,6 +48,7 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/dependency-extraction-webpack-plugin/.eslintrc.js b/packages/js/dependency-extraction-webpack-plugin/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/dependency-extraction-webpack-plugin/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/dependency-extraction-webpack-plugin/package.json b/packages/js/dependency-extraction-webpack-plugin/package.json index 6add7dbe320..eccc6705f2b 100644 --- a/packages/js/dependency-extraction-webpack-plugin/package.json +++ b/packages/js/dependency-extraction-webpack-plugin/package.json @@ -25,6 +25,8 @@ }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/eslint-plugin/.eslintrc.js b/packages/js/eslint-plugin/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/eslint-plugin/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/eslint-plugin/CHANGELOG.md b/packages/js/eslint-plugin/CHANGELOG.md index b64875f9937..c76f06133a2 100644 --- a/packages/js/eslint-plugin/CHANGELOG.md +++ b/packages/js/eslint-plugin/CHANGELOG.md @@ -13,7 +13,7 @@ - Update `@wordpress/eslint-plugin` from v8 to v11. #8475 - Update `@typescript-eslint/parser` from v4 to v5. #8475 - Drop support for Node v10. Required node version is now ^12.22.0 || ^14.17.0 || >=16.0.0. #8475 - +- Update recommended eslint rules for @woocommerce/* packages, please see `recommended.js` for details. # 1.2.0 diff --git a/packages/js/eslint-plugin/configs/recommended.js b/packages/js/eslint-plugin/configs/recommended.js index e42dc8286ce..acadbb1a92f 100644 --- a/packages/js/eslint-plugin/configs/recommended.js +++ b/packages/js/eslint-plugin/configs/recommended.js @@ -7,10 +7,75 @@ module.exports = { parser: '@typescript-eslint/parser', globals: { wcSettings: 'readonly', + 'jest/globals': true, + jest: true, }, plugins: [ '@wordpress' ], rules: { radix: 'error', yoda: [ 'error', 'never' ], + // temporary conversion to warnings until the below are all handled. + '@wordpress/i18n-translator-comments': 'warn', + '@wordpress/valid-sprintf': 'warn', + '@wordpress/no-unsafe-wp-apis': 'warn', + '@wordpress/no-global-active-element': 'warn', + 'import/no-extraneous-dependencies': 'warn', + 'import/no-unresolved': 'warn', + 'jest/no-deprecated-functions': 'warn', + 'jest/valid-title': 'warn', + 'jsdoc/check-tag-names': [ + 'error', + { + definedTags: [ + 'jest-environment', + 'filter', + 'action', + 'slotFill', + 'scope', + ], + }, + ], + 'no-unused-vars': [ + 'error', + { + varsIgnorePattern: 'createElement', + }, + ], + 'react/react-in-jsx-scope': 'error', }, + settings: { + 'import/resolver': 'typescript', + // List of modules that are externals in our webpack config. + 'import/core-modules': [ '@woocommerce/settings', 'lodash', 'react' ], + react: { + pragma: 'createElement', + }, + }, + overrides: [ + { + files: [ '*.ts', '*.tsx' ], + extends: [ 'plugin:@typescript-eslint/recommended' ], + rules: { + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-use-before-define': [ 'error' ], + '@typescript-eslint/no-shadow': [ 'error' ], + '@typescript-eslint/no-empty-function': 'off', + camelcase: 'off', + 'no-use-before-define': 'off', + 'jsdoc/require-param': 'off', + // Making use of typescript no-shadow instead, fixes issues with enum. + 'no-shadow': 'off', + }, + }, + { + files: [ + '**/stories/*.js', + '**/stories/*.jsx', + '**/docs/example.js', + ], + rules: { + 'react/react-in-jsx-scope': 'off', + }, + }, + ], }; diff --git a/packages/js/eslint-plugin/package.json b/packages/js/eslint-plugin/package.json index 4a5f70e1495..787d6b7011d 100644 --- a/packages/js/eslint-plugin/package.json +++ b/packages/js/eslint-plugin/package.json @@ -28,7 +28,6 @@ "dependencies": { "@typescript-eslint/parser": "^5.14.0", "@wordpress/eslint-plugin": "^11.0.0", - "eslint": "^8.10.0", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-testing-library": "^5.1.0", "requireindex": "^1.2.0" @@ -36,8 +35,12 @@ "publishConfig": { "access": "public" }, + "scripts": { + "lint": "eslint ./rules ./configs" + }, "devDependencies": { "@babel/core": "^7.17.5", + "eslint": "^8.11.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/experimental/.eslintrc.js b/packages/js/experimental/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/experimental/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/experimental/package.json b/packages/js/experimental/package.json index 987051096b3..8a7530f6085 100644 --- a/packages/js/experimental/package.json +++ b/packages/js/experimental/package.json @@ -54,8 +54,10 @@ "@types/react-transition-group": "^4.4.4", "@woocommerce/style-build": "workspace:*", "@wordpress/browserslist-config": "^4.1.1", + "@wordpress/eslint-plugin": "^11.0.0", "concurrently": "^7.0.0", "css-loader": "^3.6.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "postcss-loader": "^3.0.0", @@ -77,6 +79,7 @@ "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/explat/.eslintrc.js b/packages/js/explat/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/explat/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/explat/package.json b/packages/js/explat/package.json index 63a1830e1e4..533172d328f 100644 --- a/packages/js/explat/package.json +++ b/packages/js/explat/package.json @@ -37,6 +37,8 @@ "@types/cookie": "^0.4.1", "@types/node": "^17.0.21", "@types/qs": "^6.9.7", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", @@ -48,6 +50,7 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" diff --git a/packages/js/explat/src/assignment.ts b/packages/js/explat/src/assignment.ts index b363550551d..2edef45ea1e 100644 --- a/packages/js/explat/src/assignment.ts +++ b/packages/js/explat/src/assignment.ts @@ -26,7 +26,6 @@ const getRequestQueryString = ( { * args.experimentName = 'my-experiment'; * return args; * }); - * */ return stringify( applyFilters( 'woocommerce_explat_request_args', { diff --git a/packages/js/js-tests/.eslintrc.js b/packages/js/js-tests/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/js-tests/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/js-tests/package.json b/packages/js/js-tests/package.json index 029ef497544..c6de210f262 100644 --- a/packages/js/js-tests/package.json +++ b/packages/js/js-tests/package.json @@ -20,7 +20,8 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "ts:check": "tsc --noEmit --project ./tsconfig.json", "clean": "pnpm exec rimraf *.tsbuildinfo build build-*", - "prepack": "pnpm run clean && pnpm run build" + "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src" }, "dependencies": { "@testing-library/jest-dom": "^5.16.2", @@ -32,6 +33,8 @@ }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/navigation/.eslintrc.js b/packages/js/navigation/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/navigation/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/navigation/package.json b/packages/js/navigation/package.json index 5ea5783a869..c4b578c2cc6 100644 --- a/packages/js/navigation/package.json +++ b/packages/js/navigation/package.json @@ -42,12 +42,16 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", + "@babel/runtime": "^7.17.2", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/notices/.eslintrc.js b/packages/js/notices/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/notices/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/notices/package.json b/packages/js/notices/package.json index ff56439a1ef..ca89ed63893 100644 --- a/packages/js/notices/package.json +++ b/packages/js/notices/package.json @@ -39,10 +39,13 @@ "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build" + "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/number/.eslintrc.js b/packages/js/number/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/number/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/number/package.json b/packages/js/number/package.json index a5800f2be85..d7daf0f01d0 100644 --- a/packages/js/number/package.json +++ b/packages/js/number/package.json @@ -30,12 +30,16 @@ "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src", "test": "pnpm run build && pnpm run test:nobuild", "test:nobuild": "jest --config ./jest.config.json", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", + "@babel/runtime": "^7.17.2", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/onboarding/.eslintrc.js b/packages/js/onboarding/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/onboarding/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/onboarding/package.json b/packages/js/onboarding/package.json index 7dfae1f6da0..8ee2642b336 100644 --- a/packages/js/onboarding/package.json +++ b/packages/js/onboarding/package.json @@ -38,7 +38,9 @@ "@babel/core": "^7.17.5", "@woocommerce/style-build": "workspace:*", "@wordpress/browserslist-config": "^4.1.1", + "@wordpress/eslint-plugin": "^11.0.0", "css-loader": "^3.6.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "postcss-loader": "^3.0.0", @@ -55,6 +57,7 @@ "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", - "prepack": "pnpm run clean && pnpm run build" + "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src" } } diff --git a/packages/js/style-build/.eslintrc.js b/packages/js/style-build/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/style-build/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/style-build/package.json b/packages/js/style-build/package.json index 3e783a2a0af..96926105d6c 100644 --- a/packages/js/style-build/package.json +++ b/packages/js/style-build/package.json @@ -22,15 +22,20 @@ "@wordpress/base-styles": "^3.6.0", "@wordpress/postcss-plugins-preset": "^1.6.0", "css-loader": "^3.6.0", + "mini-css-extract-plugin": "^2.6.0", "postcss-loader": "^3.0.0", "sass-loader": "^10.2.1", "webpack-remove-empty-scripts": "^0.7.3", - "mini-css-extract-plugin": "^2.6.0", "webpack-rtl-plugin": "^2.0.0" }, + "scripts": { + "lint": "eslint index.js" + }, "private": true, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/packages/js/tracks/.eslintrc.js b/packages/js/tracks/.eslintrc.js new file mode 100644 index 00000000000..e4d185d8cd1 --- /dev/null +++ b/packages/js/tracks/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], + root: true, +}; diff --git a/packages/js/tracks/package.json b/packages/js/tracks/package.json index 08f6c2ae204..314b4c9abe5 100644 --- a/packages/js/tracks/package.json +++ b/packages/js/tracks/package.json @@ -30,10 +30,13 @@ "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build" + "prepack": "pnpm run clean && pnpm run build", + "lint": "eslint src" }, "devDependencies": { "@babel/core": "^7.17.5", + "@wordpress/eslint-plugin": "^11.0.0", + "eslint": "^8.12.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "rimraf": "^3.0.2", diff --git a/plugins/woocommerce-admin/.eslintignore b/plugins/woocommerce-admin/.eslintignore index c713ed230a8..a832885d3e1 100644 --- a/plugins/woocommerce-admin/.eslintignore +++ b/plugins/woocommerce-admin/.eslintignore @@ -10,3 +10,12 @@ vendor legacy tests/e2e build-types + +# These packages have their own eslint config and command +api +e2e-environment +e2e-utils + +# These packages don't have their eslint setup, but have many lint errors. +api-core-tests +e2e-core-tests diff --git a/plugins/woocommerce-admin/.eslintrc.js b/plugins/woocommerce-admin/.eslintrc.js index 6b7a272c843..cd20ad02884 100644 --- a/plugins/woocommerce-admin/.eslintrc.js +++ b/plugins/woocommerce-admin/.eslintrc.js @@ -1,77 +1,9 @@ module.exports = { - env: { - 'jest/globals': true, - }, extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ], - settings: { - 'import/resolver': 'typescript', - // List of modules that are externals in our webpack config. - 'import/core-modules': [ '@woocommerce/settings', 'lodash', 'react' ], - react: { - pragma: 'createElement', - }, - }, root: true, - rules: { - // temporary conversion to warnings until the below are all handled. - '@wordpress/i18n-translator-comments': 'warn', - '@wordpress/valid-sprintf': 'warn', - 'jsdoc/check-tag-names': [ - 'error', - { - definedTags: [ - 'jest-environment', - 'filter', - 'action', - 'slotFill', - 'scope', - ], - }, - ], - 'import/no-extraneous-dependencies': 'warn', - 'import/no-unresolved': 'warn', - 'jest/no-deprecated-functions': 'warn', - '@wordpress/no-unsafe-wp-apis': 'warn', - 'jest/valid-title': 'warn', - '@wordpress/no-global-active-element': 'warn', - 'no-unused-vars': [ - 'error', - { - varsIgnorePattern: 'createElement', - }, - ], - 'react/react-in-jsx-scope': 'error', - }, overrides: [ { - files: [ '*.ts', '*.tsx' ], - parser: '@typescript-eslint/parser', - extends: [ - 'plugin:@woocommerce/eslint-plugin/recommended', - 'plugin:@typescript-eslint/recommended', - ], - rules: { - camelcase: 'off', - 'import/no-unresolved': 'warn', - 'import/no-extraneous-dependencies': 'warn', - '@typescript-eslint/no-explicit-any': 'error', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': [ 'error' ], - 'jsdoc/require-param': 'off', - // Making use of typescript no-shadow instead, fixes issues with enum. - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ 'error' ], - '@typescript-eslint/no-empty-function': 'off', - }, - }, - { - files: [ - 'client/**/*.js', - 'client/**/*.jsx', - '**/stories/*.js', - '**/stories/*.jsx', - '**/docs/example.js', - ], + files: [ 'client/**/*.js', 'client/**/*.jsx', 'client/**/*.tsx' ], rules: { 'react/react-in-jsx-scope': 'off', }, diff --git a/plugins/woocommerce-admin/client/homescreen/layout.js b/plugins/woocommerce-admin/client/homescreen/layout.js index 68bc482feff..27be7f5578b 100644 --- a/plugins/woocommerce-admin/client/homescreen/layout.js +++ b/plugins/woocommerce-admin/client/homescreen/layout.js @@ -289,8 +289,8 @@ export default compose( const taskLists = getTaskLists(); const welcomeFromCalypsoModalDismissed = - getOption( WELCOME_FROM_CALYPSO_MODAL_DISMISSED_OPTION_NAME ) === - 'yes'; + getOption( WELCOME_FROM_CALYPSO_MODAL_DISMISSED_OPTION_NAME ) !== + 'no'; const welcomeFromCalypsoModalDismissedResolved = hasFinishedResolution( 'getOption', [ WELCOME_FROM_CALYPSO_MODAL_DISMISSED_OPTION_NAME ] @@ -305,7 +305,7 @@ export default compose( fromCalypsoUrlArgIsPresent; const welcomeModalDismissed = - getOption( WELCOME_MODAL_DISMISSED_OPTION_NAME ) === 'yes'; + getOption( WELCOME_MODAL_DISMISSED_OPTION_NAME ) !== 'no'; const installTimestamp = getOption( WOOCOMMERCE_ADMIN_INSTALL_TIMESTAMP_OPTION_NAME diff --git a/plugins/woocommerce-admin/client/task-lists/progress-header/progress-header.tsx b/plugins/woocommerce-admin/client/task-lists/progress-header/progress-header.tsx index 9b93c302b48..33195578f51 100644 --- a/plugins/woocommerce-admin/client/task-lists/progress-header/progress-header.tsx +++ b/plugins/woocommerce-admin/client/task-lists/progress-header/progress-header.tsx @@ -25,9 +25,9 @@ export const ProgressHeader: React.FC< ProgressHeaderProps > = ( { const taskList: TaskListType = select( ONBOARDING_STORE_NAME ).getTaskList( taskListId ); - const finishedResolution = select( ONBOARDING_STORE_NAME ).hasFinishedResolution( - 'getTaskList', [ taskListId ] - ); + const finishedResolution = select( + ONBOARDING_STORE_NAME + ).hasFinishedResolution( 'getTaskList', [ taskListId ] ); const nowTimestamp = Date.now(); const visibleTasks = taskList?.tasks.filter( ( task ) => @@ -49,7 +49,10 @@ export const ProgressHeader: React.FC< ProgressHeaderProps > = ( { ); const progressTitle = useMemo( () => { - if ( ( ! hasVisitedTasks && completedCount < 2 ) || completedCount === tasksCount ) { + if ( + ( ! hasVisitedTasks && completedCount < 2 ) || + completedCount === tasksCount + ) { const siteTitle = getSetting( 'siteTitle' ); return siteTitle ? sprintf( diff --git a/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.scss b/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.scss index e96f12674e3..d2bbcae7782 100644 --- a/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.scss +++ b/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.scss @@ -6,7 +6,7 @@ align-items: center; color: #fff; - &:before { + &::before { content: ''; } diff --git a/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.tsx b/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.tsx index b624eb0e0c4..52904fb3ad5 100644 --- a/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.tsx +++ b/plugins/woocommerce-admin/client/tasks/reminder-bar/reminder-bar.tsx @@ -102,9 +102,8 @@ export const TasksReminderBar: React.FC< ReminderBarProps > = ( { ( ! task.isSnoozed || task.snoozedUntil < Date.now() ) ); - const completedTasks = (visibleTasks?.filter( - ( task ) => task.isComplete - ) || []); + const completedTasks = + visibleTasks?.filter( ( task ) => task.isComplete ) || []; const isResolved = taskListIsResolved && optionIsResolved; diff --git a/plugins/woocommerce-admin/client/tsconfig.json b/plugins/woocommerce-admin/client/tsconfig.json index 6391bab1154..361c00d0216 100644 --- a/plugins/woocommerce-admin/client/tsconfig.json +++ b/plugins/woocommerce-admin/client/tsconfig.json @@ -17,11 +17,11 @@ "typeRoots": [ "../typings", "../node_modules/@types", - "../packages/**/node_modules/@types" + "../../../packages/js/**/node_modules/@types" ], "baseUrl": "./", "paths": { - "@woocommerce/*": [ "../packages/*/src" ], + "@woocommerce/*": [ "../../../packages/js/*/src" ], "~/*": [ "./*" ] }, "declaration": false, @@ -30,20 +30,20 @@ }, "exclude": [ "node_modules", "build", "build-module", "dist", "vendor" ], "references": [ - { "path": "../packages/admin-e2e-tests" }, - { "path": "../packages/components" }, - { "path": "../packages/csv-export" }, - { "path": "../packages/currency" }, - { "path": "../packages/customer-effort-score" }, - { "path": "../packages/data" }, - { "path": "../packages/date" }, - { "path": "../packages/experimental" }, - { "path": "../packages/explat" }, - { "path": "../packages/js-tests" }, - { "path": "../packages/navigation" }, - { "path": "../packages/notices" }, - { "path": "../packages/number" }, - { "path": "../packages/onboarding" }, - { "path": "../packages/tracks" } - ] + { "path": "../../../packages/js/admin-e2e-tests" }, + { "path": "../../../packages/js/components" }, + { "path": "../../../packages/js/csv-export" }, + { "path": "../../../packages/js/currency" }, + { "path": "../../../packages/js/customer-effort-score" }, + { "path": "../../../packages/js/data" }, + { "path": "../../../packages/js/date" }, + { "path": "../../../packages/js/experimental" }, + { "path": "../../../packages/js/explat" }, + { "path": "../../../packages/js/js-tests" }, + { "path": "../../../packages/js/navigation" }, + { "path": "../../../packages/js/notices" }, + { "path": "../../../packages/js/number" }, + { "path": "../../../packages/js/onboarding" }, + { "path": "../../../packages/js/tracks" } + ] } diff --git a/plugins/woocommerce-admin/client/two-column-tasks/task-list.tsx b/plugins/woocommerce-admin/client/two-column-tasks/task-list.tsx index fcda749d602..61fa62ad6cd 100644 --- a/plugins/woocommerce-admin/client/two-column-tasks/task-list.tsx +++ b/plugins/woocommerce-admin/client/two-column-tasks/task-list.tsx @@ -6,12 +6,16 @@ import { useEffect, useRef, useState, createElement } from '@wordpress/element'; import { Button, Card } from '@wordpress/components'; import { useSelect, useDispatch } from '@wordpress/data'; import { EllipsisMenu } from '@woocommerce/components'; -import { updateQueryString, getHistory, getNewPath } from '@woocommerce/navigation'; +import { + updateQueryString, + getHistory, + getNewPath, +} from '@woocommerce/navigation'; import { OPTIONS_STORE_NAME, ONBOARDING_STORE_NAME, TaskType, - useUserPreferences + useUserPreferences, } from '@woocommerce/data'; import { recordEvent } from '@woocommerce/tracks'; import { List, TaskItem } from '@woocommerce/experimental'; diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index 53936888e11..25c5622f88a 100644 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -1,6 +1,6 @@ { "name": "@woocommerce/admin-library", - "version": "3.4.0-dev", + "version": "3.3.0", "homepage": "https://woocommerce.github.io/woocommerce-admin/", "repository": { "type": "git", @@ -46,13 +46,12 @@ "lint": "pnpm run lint:js && pnpm run lint:css", "lint:css": "stylelint '**/*.scss'", "lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'", - "lint:js": "wp-scripts lint-js ../../packages/js ./client --ext=js,ts,tsx", + "lint:js": "wp-scripts lint-js ./client --ext=js,ts,tsx", "lint:js:packages": "wp-scripts lint-js ../../packages/js --ext=js,ts,tsx", - "lint:js:client": "wp-scripts lint-js ./client --ext=js,ts,tsx", "lint:js-fix": "pnpm run lint:js -- --fix --ext=js,ts,tsx", "lint:php": "./vendor/bin/phpcs --standard=phpcs.xml.dist $(git ls-files | grep .php$)", "lint:php-fix": "./vendor/bin/phpcbf --standard=phpcs.xml.dist $(git ls-files | grep .php$)", - "ts:check": "tsc --build ./tsconfig.json", + "ts:check": "tsc --build ./tsconfig.json --pretty", "ts:check:watch": "npm run ts:check -- --watch", "reformat-files": "wp-scripts format-js -- --ignore-path .eslintignore", "prepack": "pnpm install && pnpm run lint && pnpm run test && cross-env WC_ADMIN_PHASE=core pnpm run build", @@ -236,6 +235,7 @@ "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "^2.25.4", "eslint-plugin-react": "^7.29.2", + "expose-loader": "^3.1.0", "fork-ts-checker-webpack-plugin": "^6.5.0", "fs-extra": "^8.1.0", "grunt": "^1.4.1", diff --git a/plugins/woocommerce-admin/project.json b/plugins/woocommerce-admin/project.json index b255cfa7814..ab54b7b0a8f 100644 --- a/plugins/woocommerce-admin/project.json +++ b/plugins/woocommerce-admin/project.json @@ -35,6 +35,12 @@ ], "parallel": true } + }, + "lint": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "lint" + } } } } diff --git a/plugins/woocommerce-admin/storybook/.storybook/main.js b/plugins/woocommerce-admin/storybook/.storybook/main.js index 7167788b42b..5e613f04411 100644 --- a/plugins/woocommerce-admin/storybook/.storybook/main.js +++ b/plugins/woocommerce-admin/storybook/.storybook/main.js @@ -6,9 +6,9 @@ module.exports = { }, stories: [ // WooCommerce Admin / @woocommerce/components components - '../../packages/components/src/**/stories/*.@(js|tsx)', + '../../../../packages/js/components/src/**/stories/*.@(js|tsx)', // WooCommerce Admin / @woocommerce/experimental components - '../../packages/experimental/src/**/stories/*.@(js|tsx)', + '../../../../packages/js/experimental/src/**/stories/*.@(js|tsx)', '../../client/**/stories/*.js', ], addons: [ diff --git a/plugins/woocommerce-admin/storybook/webpack.config.js b/plugins/woocommerce-admin/storybook/webpack.config.js index 1dedd724879..dfb3dc58ca9 100644 --- a/plugins/woocommerce-admin/storybook/webpack.config.js +++ b/plugins/woocommerce-admin/storybook/webpack.config.js @@ -22,14 +22,32 @@ const wcAdminPackages = [ ]; module.exports = ( storybookConfig ) => { - storybookConfig.module.rules.push( ...wcAdminWebpackConfig.module.rules ); + storybookConfig.module.rules = [ + ...storybookConfig.module.rules, + ...wcAdminWebpackConfig.module.rules, + // We need to expose packages in "peerDependencies" to the global scope for @woocommerce/* to resolve packages. + { + test: require.resolve( 'moment' ), + loader: 'expose-loader', + options: { + exposes: [ 'moment' ], + }, + }, + { + test: require.resolve( '@wordpress/data' ), + loader: 'expose-loader', + options: { + exposes: [ '_wp_data' ], + }, + }, + ]; storybookConfig.resolve.alias = wcAdminWebpackConfig.resolve.alias; wcAdminPackages.forEach( ( name ) => { storybookConfig.resolve.alias[ `@woocommerce/${ name }` - ] = path.resolve( __dirname, `../packages/${ name }/src` ); + ] = path.resolve( __dirname, `../../../packages/js/${ name }/src` ); } ); storybookConfig.resolve.alias[ '@woocommerce/settings' ] = path.resolve( @@ -53,14 +71,14 @@ module.exports = ( storybookConfig ) => { { from: path.resolve( __dirname, - `../packages/components/build-style/*.css` + `../../../packages/js/components/build-style/*.css` ), to: `./component-css/[name][ext]`, }, { from: path.resolve( __dirname, - `../packages/experimental/build-style/*.css` + `../../../packages/js/experimental/build-style/*.css` ), to: `./experimental-css/[name][ext]`, }, @@ -68,5 +86,10 @@ module.exports = ( storybookConfig ) => { } ) ); + storybookConfig.externals = { + '@wordpress/data': '_wp_data', + moment: 'moment', + }; + return storybookConfig; }; diff --git a/plugins/woocommerce-admin/tsconfig.json b/plugins/woocommerce-admin/tsconfig.json index b49dde87235..5c4f506d90b 100644 --- a/plugins/woocommerce-admin/tsconfig.json +++ b/plugins/woocommerce-admin/tsconfig.json @@ -17,11 +17,11 @@ "typeRoots": [ "./typings", "./node_modules/@types", - "packages/**/node_modules/@types" + "../../packages/js/**/node_modules/@types" ], "baseUrl": "./", "paths": { - "@woocommerce/*": [ "packages/*/src" ], + "@woocommerce/*": [ "../../packages/js/*/src" ], "~/*": [ "client/*" ] } }, @@ -29,20 +29,20 @@ "files": [], "references": [ { "path": "client/" }, - { "path": "packages/admin-e2e-tests" }, - { "path": "packages/components" }, - { "path": "packages/csv-export" }, - { "path": "packages/currency" }, - { "path": "packages/customer-effort-score" }, - { "path": "packages/data" }, - { "path": "packages/date" }, - { "path": "packages/experimental" }, - { "path": "packages/explat" }, - { "path": "packages/js-tests" }, - { "path": "packages/navigation" }, - { "path": "packages/notices" }, - { "path": "packages/number" }, - { "path": "packages/onboarding" }, - { "path": "packages/tracks" }, + { "path": "../../packages/js/admin-e2e-tests" }, + { "path": "../../packages/js/components" }, + { "path": "../../packages/js/csv-export" }, + { "path": "../../packages/js/currency" }, + { "path": "../../packages/js/customer-effort-score" }, + { "path": "../../packages/js/data" }, + { "path": "../../packages/js/date" }, + { "path": "../../packages/js/experimental" }, + { "path": "../../packages/js/explat" }, + { "path": "../../packages/js/js-tests" }, + { "path": "../../packages/js/navigation" }, + { "path": "../../packages/js/notices" }, + { "path": "../../packages/js/number" }, + { "path": "../../packages/js/onboarding" }, + { "path": "../../packages/js/tracks" }, ] } diff --git a/plugins/woocommerce-admin/woocommerce-admin.php b/plugins/woocommerce-admin/woocommerce-admin.php index 25b969ec377..484ed9865f9 100755 --- a/plugins/woocommerce-admin/woocommerce-admin.php +++ b/plugins/woocommerce-admin/woocommerce-admin.php @@ -7,7 +7,7 @@ * Author URI: https://woocommerce.com/ * Text Domain: woocommerce-admin * Domain Path: /languages - * Version: 3.4.0-dev + * Version: 3.3.0 * Requires at least: 5.6 * Requires PHP: 7.0 * diff --git a/plugins/woocommerce/.gitignore b/plugins/woocommerce/.gitignore index d2b20c141ff..88c7e8dfbfa 100644 --- a/plugins/woocommerce/.gitignore +++ b/plugins/woocommerce/.gitignore @@ -22,6 +22,7 @@ tests/cli/vendor /tests/e2e/docker /tests/e2e/screenshots /tests/e2e/plugins +.phpunit.result.cache # Packages /packages/* diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json index f56bd9d1b9e..47977376e15 100644 --- a/plugins/woocommerce/composer.json +++ b/plugins/woocommerce/composer.json @@ -13,19 +13,20 @@ } ], "require": { - "php": ">=7.0", + "php": ">=7.2", "automattic/jetpack-autoloader": "2.10.1", "automattic/jetpack-constants": "1.5.1", - "composer/installers": "~1.7", - "maxmind-db/reader": "1.6.0", - "pelago/emogrifier": "3.1.0", + "composer/installers": "^1.9", + "maxmind-db/reader": "^1.11", + "pelago/emogrifier": "^6.0", "psr/container": "1.0.0", "woocommerce/action-scheduler": "3.4.0", - "woocommerce/woocommerce-blocks": "7.2.0" + "woocommerce/woocommerce-blocks": "7.2.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4", "yoast/phpunit-polyfills": "^1.0", + "phpunit/phpunit": "7.5.20", "automattic/jetpack-changelogger": "3.0.2" }, "config": { @@ -37,7 +38,7 @@ }, "sort-packages": true, "platform": { - "php": "7.0.33" + "php": "7.2" }, "allow-plugins": { "automattic/jetpack-autoloader": true, diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock index fb81444adee..5899a2c583d 100644 --- a/plugins/woocommerce/composer.lock +++ b/plugins/woocommerce/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": "9b47cf03d758a6131bd2b4686b1b2003", + "content-hash": "362a4c80079f72e193bb35b1e22c8598", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -243,29 +243,30 @@ }, { "name": "maxmind-db/reader", - "version": "v1.6.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", - "reference": "febd4920bf17c1da84cef58e56a8227dfb37fbe4" + "reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/febd4920bf17c1da84cef58e56a8227dfb37fbe4", - "reference": "febd4920bf17c1da84cef58e56a8227dfb37fbe4", + "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b1f3c0699525336d09cc5161a2861268d9f2ae5b", + "reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.2" }, "conflict": { - "ext-maxminddb": "<1.6.0,>=2.0.0" + "ext-maxminddb": "<1.10.1,>=2.0.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "2.*", + "friendsofphp/php-cs-fixer": "3.*", "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpcov": "^3.0", - "phpunit/phpunit": "5.*", + "phpstan/phpstan": "*", + "phpunit/phpcov": ">=6.0.0", + "phpunit/phpunit": ">=8.0.0,<10.0.0", "squizlabs/php_codesniffer": "3.*" }, "suggest": { @@ -301,45 +302,45 @@ ], "support": { "issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues", - "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.6.0" + "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.11.0" }, - "time": "2019-12-19T22:59:03+00:00" + "time": "2021-10-18T15:23:10+00:00" }, { "name": "pelago/emogrifier", - "version": "v3.1.0", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "f6a5c7d44612d86c3901c93f1592f5440e6b2cd8" + "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/f6a5c7d44612d86c3901c93f1592f5440e6b2cd8", - "reference": "f6a5c7d44612d86c3901c93f1592f5440e6b2cd8", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/aa72d5407efac118f3896bcb995a2cba793df0ae", + "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "^5.6 || ~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4", - "symfony/css-selector": "^2.8 || ^3.0 || ^4.0 || ^5.0" + "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0", + "sabberworm/php-css-parser": "^8.3.1", + "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.3 || ^6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15.3", - "phpmd/phpmd": "^2.7.0", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^3.5.0" + "php-parallel-lint/php-parallel-lint": "^1.3.0", + "phpunit/phpunit": "^8.5.16", + "rawr/cross-data-providers": "^2.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-main": "7.0.x-dev" } }, "autoload": { "psr-4": { - "Pelago\\": "src/" + "Pelago\\Emogrifier\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -381,7 +382,7 @@ "issues": "https://github.com/MyIntervals/emogrifier/issues", "source": "https://github.com/MyIntervals/emogrifier" }, - "time": "2019-12-26T19:37:31+00:00" + "time": "2021-09-16T16:22:04+00:00" }, { "name": "psr/container", @@ -437,21 +438,75 @@ "time": "2017-02-14T16:28:37+00:00" }, { - "name": "symfony/css-selector", - "version": "v3.4.47", + "name": "sabberworm/php-css-parser", + "version": "8.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33" + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/da3d9da2ce0026771f5fe64cb332158f1bd2bc33", - "reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "ext-iconv": "*", + "php": ">=5.6.20" + }, + "require-dev": { + "codacy/coverage": "^1.4", + "phpunit/phpunit": "^4.8.36" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", + "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" + }, + "time": "2021-12-11T13:40:54+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v4.4.37", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0628e6c6d7c92f1a7bae543959bdc17347be2436", + "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -480,10 +535,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony CssSelector Component", + "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v3.4.47" + "source": "https://github.com/symfony/css-selector/tree/v4.4.37" }, "funding": [ { @@ -499,7 +554,90 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-01-02T09:41:36+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.25.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-04T08:16:47+00:00" }, { "name": "woocommerce/action-scheduler", @@ -711,34 +849,32 @@ }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -752,42 +888,60 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/master" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, - "time": "2015-06-14T21:17:01+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -812,28 +966,34 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, - "time": "2017-10-19T19:58:43+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -873,20 +1033,20 @@ "issues": "https://github.com/phar-io/manifest/issues", "source": "https://github.com/phar-io/manifest/tree/master" }, - "time": "2017-03-05T18:14:27+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -924,39 +1084,34 @@ "issues": "https://github.com/phar-io/version/issues", "source": "https://github.com/phar-io/version/tree/master" }, - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -980,47 +1135,44 @@ ], "support": { "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" }, - "time": "2017-09-11T18:02:19+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1031,41 +1183,45 @@ { "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/release/4.x" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2019-12-28T18:55:12+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "cf842904952e64e703800d094cdf34e715a8a3ae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae", - "reference": "cf842904952e64e703800d094cdf34e715a8a3ae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -1083,41 +1239,42 @@ "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/master" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2017-12-30T13:23:38+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.10.3", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "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" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -1152,46 +1309,46 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.2", + "version": "6.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1219,31 +1376,34 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/5.3" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" }, - "time": "2018-04-06T15:36:58+00:00" + "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1258,7 +1418,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1269,11 +1429,16 @@ "iterator" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, - "time": "2017-11-27T13:52:08+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -1322,28 +1487,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1358,7 +1523,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1369,35 +1534,41 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" }, - "time": "2017-02-26T11:10:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1422,60 +1593,66 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "abandoned": true, - "time": "2017-11-27T05:48:46+00:00" + "time": "2021-07-26T12:15:06+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.14", + "version": "7.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.9", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", + "phpunit/php-timer": "^2.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "phpunit/phpunit-mock-objects": "*" }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -1483,7 +1660,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1511,73 +1688,9 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/6.5.14" + "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" }, - "time": "2019-02-01T05:22:47+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5.11" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-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": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", - "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/5.0.10" - }, - "abandoned": true, - "time": "2018-08-09T05:50:03+00:00" + "time": "2020-01-08T08:45:45+00:00" }, { "name": "psr/log", @@ -1686,30 +1799,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": ">=7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1722,6 +1835,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1733,10 +1850,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -1748,34 +1861,41 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/master" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" }, - "time": "2018-02-01T13:46:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1788,50 +1908,62 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/master" + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" }, - "time": "2017-08-03T08:09:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1858,9 +1990,15 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/master" + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, - "time": "2017-07-01T08:51:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", @@ -2171,25 +2309,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2211,9 +2349,15 @@ "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/master" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, - "time": "2015-07-28T20:34:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/version", @@ -2348,27 +2492,27 @@ }, { "name": "symfony/debug", - "version": "v3.4.47", + "version": "v4.4.37", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae" + "reference": "5de6c6e7f52b364840e53851c126be4d71e60470" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", - "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "url": "https://api.github.com/repos/symfony/debug/zipball/5de6c6e7f52b364840e53851c126be4d71e60470", + "reference": "5de6c6e7f52b364840e53851c126be4d71e60470", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/log": "~1.0" + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", "autoload": { @@ -2393,10 +2537,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v3.4.47" + "source": "https://github.com/symfony/debug/tree/v4.4.37" }, "funding": [ { @@ -2412,24 +2556,27 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-01-02T09:41:36+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.19.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" @@ -2437,7 +2584,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2475,7 +2622,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -2491,24 +2638,27 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.19.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce", - "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { "ext-mbstring": "For best performance" @@ -2516,7 +2666,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2555,7 +2705,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -2571,7 +2721,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/process", @@ -2636,23 +2786,23 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -2674,36 +2824,47 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -2727,9 +2888,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" }, { "name": "wikimedia/at-ease", @@ -2854,11 +3015,11 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.0" + "php": ">=7.2" }, "platform-dev": [], "platform-overrides": { - "php": "7.0.33" + "php": "7.2" }, "plugin-api-version": "2.2.0" } diff --git a/plugins/woocommerce/includes/class-wc-datetime.php b/plugins/woocommerce/includes/class-wc-datetime.php index 1778503d5d1..839312b6e0a 100644 --- a/plugins/woocommerce/includes/class-wc-datetime.php +++ b/plugins/woocommerce/includes/class-wc-datetime.php @@ -44,8 +44,9 @@ class WC_DateTime extends DateTime { /** * Get UTC offset if set, or default to the DateTime object's offset. */ + #[\ReturnTypeWillChange] public function getOffset() { - return $this->utc_offset ? $this->utc_offset : parent::getOffset(); + return $this->utc_offset ?: parent::getOffset(); } /** @@ -54,6 +55,7 @@ class WC_DateTime extends DateTime { * @param DateTimeZone $timezone DateTimeZone instance. * @return DateTime */ + #[\ReturnTypeWillChange] public function setTimezone( $timezone ) { $this->utc_offset = 0; return parent::setTimezone( $timezone ); @@ -65,6 +67,7 @@ class WC_DateTime extends DateTime { * @since 3.0.0 * @return int */ + #[\ReturnTypeWillChange] public function getTimestamp() { return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' ); } diff --git a/plugins/woocommerce/includes/class-wc-meta-data.php b/plugins/woocommerce/includes/class-wc-meta-data.php index c21d98d650c..dd0e0c752f1 100644 --- a/plugins/woocommerce/includes/class-wc-meta-data.php +++ b/plugins/woocommerce/includes/class-wc-meta-data.php @@ -47,6 +47,7 @@ class WC_Meta_Data implements JsonSerializable { * * @return object|array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->get_data(); } diff --git a/plugins/woocommerce/includes/emails/class-wc-email.php b/plugins/woocommerce/includes/emails/class-wc-email.php index 9f05fd39f28..18bd88c02c9 100644 --- a/plugins/woocommerce/includes/emails/class-wc-email.php +++ b/plugins/woocommerce/includes/emails/class-wc-email.php @@ -5,6 +5,10 @@ * @package WooCommerce\Emails */ +use Pelago\Emogrifier\CssInliner; +use Pelago\Emogrifier\HtmlProcessor\CssToAttributeConverter; +use Pelago\Emogrifier\HtmlProcessor\HtmlPruner; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -559,18 +563,20 @@ class WC_Email extends WC_Settings_API { wc_get_template( 'emails/email-styles.php' ); $css = apply_filters( 'woocommerce_email_styles', ob_get_clean(), $this ); - $emogrifier_class = 'Pelago\\Emogrifier'; + $css_inliner_class = CssInliner::class; - if ( $this->supports_emogrifier() && class_exists( $emogrifier_class ) ) { + if ( $this->supports_emogrifier() && class_exists( $css_inliner_class ) ) { try { - $emogrifier = new $emogrifier_class( $content, $css ); + $css_inliner = CssInliner::fromHtml( $content )->inlineCss( $css ); - do_action( 'woocommerce_emogrifier', $emogrifier, $this ); + do_action( 'woocommerce_emogrifier', $css_inliner, $this ); - $content = $emogrifier->emogrify(); - $html_prune = \Pelago\Emogrifier\HtmlProcessor\HtmlPruner::fromHtml( $content ); - $html_prune->removeElementsWithDisplayNone(); - $content = $html_prune->render(); + $dom_document = $css_inliner->getDomDocument(); + + HtmlPruner::fromDomDocument( $dom_document )->removeElementsWithDisplayNone(); + $content = CssToAttributeConverter::fromDomDocument( $dom_document ) + ->convertCssToVisualAttributes() + ->render(); } catch ( Exception $e ) { $logger = wc_get_logger(); $logger->error( $e->getMessage(), array( 'source' => 'emogrifier' ) ); diff --git a/plugins/woocommerce/src/Admin/Composer/Package.php b/plugins/woocommerce/src/Admin/Composer/Package.php index 6407d3eecaa..9d12915973c 100644 --- a/plugins/woocommerce/src/Admin/Composer/Package.php +++ b/plugins/woocommerce/src/Admin/Composer/Package.php @@ -26,7 +26,7 @@ class Package { * * @var string */ - const VERSION = '3.4.0-dev'; + const VERSION = '3.3.0'; /** * Package active. diff --git a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php index 26aa4f775e2..f854f6f1d80 100644 --- a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php +++ b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php @@ -155,9 +155,13 @@ class FeaturePlugin { $this->define( 'WC_ADMIN_PLUGIN_FILE', WC_PLUGIN_FILE ); $this->define( 'WC_ADMIN_IMAGES_FOLDER_URL', plugins_url( 'assets/images', WC_PLUGIN_FILE ) ); - // WARNING: Do not directly edit this version number constant. - // It is updated as part of the prebuild process from the package.json value. - $this->define( 'WC_ADMIN_VERSION_NUMBER', '3.4.0-dev' ); + /** + * Define the current WC Admin version. + * + * @deprecated 3.3.0 + * @var string + */ + define( 'WC_ADMIN_VERSION_NUMBER', '3.3.0' ); } /** diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php b/plugins/woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php index aaaa777505e..4dc51ace4d0 100644 --- a/plugins/woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php +++ b/plugins/woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php @@ -21,7 +21,7 @@ class CustomOrdersTableController { /** * The name of the option for enabling the usage of the custom orders tables */ - const CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION = 'woocommerce_custom_orders_table_enabled'; + private const CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION = 'woocommerce_custom_orders_table_enabled'; /** * The data store object to use. diff --git a/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php b/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php index 5ed07283749..4cc9651f1e7 100644 --- a/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php +++ b/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php @@ -15,7 +15,7 @@ class Definition extends BaseDefinition { /** * The standard method that we use for dependency injection. */ - const INJECTION_METHOD = 'init'; + public const INJECTION_METHOD = 'init'; /** * Resolve a class using method injection instead of constructor injection. diff --git a/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php b/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php index 6b949c510fc..ccfa173f72a 100644 --- a/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php +++ b/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php @@ -31,7 +31,7 @@ defined( 'ABSPATH' ) || exit; */ class DataRegenerator { - const PRODUCTS_PER_GENERATION_STEP = 10; + public const PRODUCTS_PER_GENERATION_STEP = 10; /** * The data store to use. diff --git a/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php b/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php index e80b32ce11c..bac31aa031c 100644 --- a/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php +++ b/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php @@ -18,10 +18,10 @@ class LookupDataStore { * Types of updates to perform depending on the current changest */ - const ACTION_NONE = 0; - const ACTION_INSERT = 1; - const ACTION_UPDATE_STOCK = 2; - const ACTION_DELETE = 3; + public const ACTION_NONE = 0; + public const ACTION_INSERT = 1; + public const ACTION_UPDATE_STOCK = 2; + public const ACTION_DELETE = 3; /** * The lookup table name. diff --git a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/ApprovedDirectoriesException.php b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/ApprovedDirectoriesException.php index 6a7f374f25f..2cc56be0540 100644 --- a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/ApprovedDirectoriesException.php +++ b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/ApprovedDirectoriesException.php @@ -9,6 +9,6 @@ use Exception; * was performed. */ class ApprovedDirectoriesException extends Exception { - const INVALID_URL = 1; - const DB_ERROR = 2; + public const INVALID_URL = 1; + public const DB_ERROR = 2; } diff --git a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Register.php b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Register.php index daabf40ec12..3d6dfdd8ad5 100644 --- a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Register.php +++ b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Register.php @@ -15,13 +15,13 @@ class Register { /** * Used to indicate the current mode. */ - const MODES = array( + private const MODES = array( self::MODE_DISABLED, self::MODE_ENABLED, ); - const MODE_DISABLED = 'disabled'; - const MODE_ENABLED = 'enabled'; + public const MODE_DISABLED = 'disabled'; + public const MODE_ENABLED = 'enabled'; /** * Name of the option used to store the current mode. See self::MODES for a diff --git a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php index 3f01954a09e..0db1da8bd5e 100644 --- a/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php +++ b/plugins/woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php @@ -16,17 +16,17 @@ class Synchronize { /** * Scheduled action hook used to facilitate scanning the product catalog for downloadable products. */ - const SYNC_TASK = 'woocommerce_download_dir_sync'; + public const SYNC_TASK = 'woocommerce_download_dir_sync'; /** * The group under which synchronization tasks run (our standard 'woocommerce-db-updates' group). */ - const SYNC_TASK_GROUP = 'woocommerce-db-updates'; + public const SYNC_TASK_GROUP = 'woocommerce-db-updates'; /** * Used to track progress throughout the sync process. */ - const SYNC_TASK_PAGE = 'wc_product_download_dir_sync_page'; + public const SYNC_TASK_PAGE = 'wc_product_download_dir_sync_page'; /** * Used to record an estimation of progress on the current synchronization process. 0 means 0%, @@ -34,12 +34,12 @@ class Synchronize { * * @param int */ - const SYNC_TASK_PROGRESS = 'wc_product_download_dir_sync_progress'; + public const SYNC_TASK_PROGRESS = 'wc_product_download_dir_sync_progress'; /** * Number of downloadable products to be processed in each atomic sync task. */ - const SYNC_TASK_BATCH_SIZE = 20; + public const SYNC_TASK_BATCH_SIZE = 20; /** * WC Queue. diff --git a/plugins/woocommerce/tests/legacy/data/sample-email.html b/plugins/woocommerce/tests/legacy/data/sample-email.html index 144b4c7b845..a76b328ed2d 100644 --- a/plugins/woocommerce/tests/legacy/data/sample-email.html +++ b/plugins/woocommerce/tests/legacy/data/sample-email.html @@ -1,5 +1,5 @@
-Hello World!
+Hello World!
diff --git a/plugins/woocommerce/tests/legacy/framework/class-wc-api-unit-test-case.php b/plugins/woocommerce/tests/legacy/framework/class-wc-api-unit-test-case.php index edb3a7f73c8..587c663a72a 100644 --- a/plugins/woocommerce/tests/legacy/framework/class-wc-api-unit-test-case.php +++ b/plugins/woocommerce/tests/legacy/framework/class-wc-api-unit-test-case.php @@ -21,7 +21,7 @@ class WC_API_Unit_Test_Case extends WC_Unit_Test_Case { * @since 2.2 * @see WC_Unit_Test_Case::setUp() */ - public function setUp() { + public function setUp(): void { parent::setUp(); diff --git a/plugins/woocommerce/tests/legacy/framework/class-wc-rest-unit-test-case.php b/plugins/woocommerce/tests/legacy/framework/class-wc-rest-unit-test-case.php index 013ec0ace8d..df7eec8f406 100644 --- a/plugins/woocommerce/tests/legacy/framework/class-wc-rest-unit-test-case.php +++ b/plugins/woocommerce/tests/legacy/framework/class-wc-rest-unit-test-case.php @@ -21,7 +21,7 @@ class WC_REST_Unit_Test_Case extends WC_Unit_Test_Case { /** * Setup our test server. */ - public function setUp() { + public function setUp(): void { parent::setUp(); global $wp_rest_server; $wp_rest_server = new WP_Test_Spy_REST_Server(); @@ -37,7 +37,7 @@ class WC_REST_Unit_Test_Case extends WC_Unit_Test_Case { /** * Unset the server. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); global $wp_rest_server; unset( $this->server ); diff --git a/plugins/woocommerce/tests/legacy/framework/class-wc-unit-test-case.php b/plugins/woocommerce/tests/legacy/framework/class-wc-unit-test-case.php index 0cb9a0830a2..debd7d242a0 100644 --- a/plugins/woocommerce/tests/legacy/framework/class-wc-unit-test-case.php +++ b/plugins/woocommerce/tests/legacy/framework/class-wc-unit-test-case.php @@ -62,7 +62,7 @@ class WC_Unit_Test_Case extends WP_HTTP_TestCase { * * @since 2.2 */ - public function setUp() { + public function setUp(): void { parent::setUp(); @@ -90,7 +90,7 @@ class WC_Unit_Test_Case extends WP_HTTP_TestCase { * * @since 3.5.0 */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); // Terms are deleted in WP_UnitTestCase::tearDownAfterClass, then e.g. Uncategorized product_cat is missing. @@ -328,6 +328,6 @@ class WC_Unit_Test_Case extends WP_HTTP_TestCase { * @return bool mixed True if the value is of integer type, false otherwise. */ public static function assertIsInteger( $actual, $message = '' ) { - return self::assertInternalType( 'int', $actual, $message ); + return self::assertIsInt( $actual, $message ); } } diff --git a/plugins/woocommerce/tests/legacy/includes/wp-http-testcase.php b/plugins/woocommerce/tests/legacy/includes/wp-http-testcase.php index 7878c21dc48..d03277392e0 100644 --- a/plugins/woocommerce/tests/legacy/includes/wp-http-testcase.php +++ b/plugins/woocommerce/tests/legacy/includes/wp-http-testcase.php @@ -134,7 +134,7 @@ abstract class WP_HTTP_TestCase extends WP_UnitTestCase { /** * @since 1.3.0 */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { if ( ! self::$did_init ) { self::init(); @@ -146,7 +146,7 @@ abstract class WP_HTTP_TestCase extends WP_UnitTestCase { /** * @since 1.3.1 */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { self::save_cache(); @@ -158,7 +158,7 @@ abstract class WP_HTTP_TestCase extends WP_UnitTestCase { * * @since 1.0.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); @@ -176,7 +176,7 @@ abstract class WP_HTTP_TestCase extends WP_UnitTestCase { * * @since 1.0.0 */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/account/permissions.php b/plugins/woocommerce/tests/legacy/unit-tests/account/permissions.php index 8b2285dd916..3a2ec0355f6 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/account/permissions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/account/permissions.php @@ -13,7 +13,7 @@ class WC_Tests_Account_Permissions extends WC_Unit_Test_Case { * Setup: * 1. Set current user to zero to simulate not logged in state. */ - public function setUp() { + public function setUp(): void { parent::setUp(); wp_set_current_user( 0 ); } @@ -22,7 +22,7 @@ class WC_Tests_Account_Permissions extends WC_Unit_Test_Case { * Teardown: * 1. Set current user to 0 because we change current user in some tests. */ - public function tearDown() { + public function tearDown(): void { wp_set_current_user( 0 ); parent::tearDown(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php b/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php index 0f43d57e2a2..56b0e4cd6ca 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php @@ -13,7 +13,7 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case { /** * Set up for tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( @@ -28,7 +28,7 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); remove_filter( 'rest_pre_dispatch', array( $this, 'mock_rest_responses' ), 10 ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/admin/notes/class-wc-tests-notes-run-db-update.php b/plugins/woocommerce/tests/legacy/unit-tests/admin/notes/class-wc-tests-notes-run-db-update.php index 6d272326578..df8411e96ac 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/admin/notes/class-wc-tests-notes-run-db-update.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/admin/notes/class-wc-tests-notes-run-db-update.php @@ -16,7 +16,7 @@ class WC_Tests_Notes_Run_Db_Update extends WC_Unit_Test_Case { * Load the necessary files, as they're not automatically loaded by WooCommerce. * */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { include_once WC_Unit_Tests_Bootstrap::instance()->plugin_dir . '/includes/admin/wc-admin-functions.php'; include_once WC_Unit_Tests_Bootstrap::instance()->plugin_dir . '/includes/admin/notes/class-wc-notes-run-db-update.php'; @@ -25,7 +25,7 @@ class WC_Tests_Notes_Run_Db_Update extends WC_Unit_Test_Case { /** * Clean up before each test. */ - public function setUp() { + public function setUp(): void { if ( ! WC()->is_wc_admin_active() ) { $this->markTestSkipped( 'WC Admin is not active on WP versions < 5.3' ); return; diff --git a/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-admin-report.php b/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-admin-report.php index 332e0630399..480af399bdc 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-admin-report.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-admin-report.php @@ -14,7 +14,7 @@ class WC_Tests_Admin_Report extends WC_Unit_Test_Case { * Load the necessary files, as they're not automatically loaded by WooCommerce. * */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { include_once WC_Unit_Tests_Bootstrap::instance()->plugin_dir . '/includes/admin/reports/class-wc-admin-report.php'; } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-report-sales-by-date.php b/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-report-sales-by-date.php index 763dd7820ac..8f3364deb11 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-report-sales-by-date.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/admin/reports/class-wc-tests-report-sales-by-date.php @@ -13,7 +13,7 @@ class WC_Tests_Report_Sales_By_Date extends WC_Unit_Test_Case { /** * Load the necessary files, as they're not automatically loaded by WooCommerce. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { include_once WC_Unit_Tests_Bootstrap::instance()->plugin_dir . '/includes/admin/reports/class-wc-admin-report.php'; include_once WC_Unit_Tests_Bootstrap::instance()->plugin_dir . '/includes/admin/reports/class-wc-report-sales-by-date.php'; } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/attributes/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/attributes/functions.php index a7d0d7e4aaa..f25eea532b6 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/attributes/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/attributes/functions.php @@ -49,7 +49,7 @@ class WC_Tests_Attributes_Functions extends WC_Unit_Test_Case { public function test_wc_create_attribute() { // Test success. $id = wc_create_attribute( array( 'name' => 'Brand' ) ); - $this->assertInternalType( 'int', $id ); + $this->assertIsInt( $id ); // Test failures. $err = wc_create_attribute( array() ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/cart/cart.php b/plugins/woocommerce/tests/legacy/unit-tests/cart/cart.php index f59fbbb7a05..f0e27b38d9f 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/cart/cart.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/cart/cart.php @@ -13,7 +13,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case { /** * tearDown. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); WC()->cart->empty_cart(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/checkout/checkout.php b/plugins/woocommerce/tests/legacy/unit-tests/checkout/checkout.php index 953351a9350..0d273e91519 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/checkout/checkout.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/checkout/checkout.php @@ -12,7 +12,7 @@ class WC_Tests_Checkout extends WC_Unit_Test_Case { /** * TearDown. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); WC()->cart->empty_cart(); } @@ -20,7 +20,7 @@ class WC_Tests_Checkout extends WC_Unit_Test_Case { /** * Setup. */ - public function setUp() { + public function setUp(): void { parent::setUp(); WC()->cart->empty_cart(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/core/main-class.php b/plugins/woocommerce/tests/legacy/unit-tests/core/main-class.php index b55707573c8..bc90cbf5fce 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/core/main-class.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/core/main-class.php @@ -26,7 +26,7 @@ class WC_Test_WooCommerce extends WC_Unit_Test_Case { * * @since 2.2 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->wc = WC(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/core/post-types-admin.php b/plugins/woocommerce/tests/legacy/unit-tests/core/post-types-admin.php index 240bf0ca913..55c122e9f1d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/core/post-types-admin.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/core/post-types-admin.php @@ -20,7 +20,7 @@ class WC_Test_Admin_Post_Types extends WC_Unit_Test_Case { /** * Setup. Create a instance to use throughout. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->wc_cpt = new WC_Admin_Post_Types(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/coupon/coupon.php b/plugins/woocommerce/tests/legacy/unit-tests/coupon/coupon.php index 35b9b5d4ac4..836ca80b011 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/coupon/coupon.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/coupon/coupon.php @@ -15,7 +15,7 @@ class WC_Tests_Coupon extends WC_Unit_Test_Case { /** * Sets up the test class. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Set a valid address for the customer so shipping rates will calculate. @@ -27,7 +27,7 @@ class WC_Tests_Coupon extends WC_Unit_Test_Case { /** * Cleans up after the test class. */ - public function tearDown() { + public function tearDown(): void { WC()->cart->empty_cart(); WC()->cart->remove_coupons(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/crud/data.php b/plugins/woocommerce/tests/legacy/unit-tests/crud/data.php index 269e37e7563..a9d56645f95 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/crud/data.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/crud/data.php @@ -13,7 +13,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case { /** * Restore UTC on failure. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); // @codingStandardsIgnoreStart date_default_timezone_set( 'UTC' ); @@ -51,7 +51,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case { */ public function test_get_data() { $object = new WC_Mock_WC_Data(); - $this->assertInternalType( 'array', $object->get_data() ); + $this->assertIsArray( $object->get_data() ); } /** diff --git a/plugins/woocommerce/tests/legacy/unit-tests/customer/class-wc-tests-customer-download.php b/plugins/woocommerce/tests/legacy/unit-tests/customer/class-wc-tests-customer-download.php index 21b6c135c62..b2768c516c8 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/customer/class-wc-tests-customer-download.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/customer/class-wc-tests-customer-download.php @@ -37,7 +37,7 @@ class WC_Tests_Customer_Download extends WC_Unit_Test_Case { /** * Tests set up. */ - public function setUp() { + public function setUp(): void { $this->customer_id = 1; $this->customer_email = 'test@example.com'; diff --git a/plugins/woocommerce/tests/legacy/unit-tests/customer/crud.php b/plugins/woocommerce/tests/legacy/unit-tests/customer/crud.php index 2b070bbc309..6b09a159d7d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/customer/crud.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/customer/crud.php @@ -277,8 +277,8 @@ class WC_Tests_CustomerCRUD extends WC_Unit_Test_Case { */ public function test_customer_get_avatar_url() { $customer = WC_Helper_Customer::create_customer(); - $this->assertContains( 'gravatar.com/avatar', $customer->get_avatar_url() ); - $this->assertContains( md5( 'test@woo.local' ), $customer->get_avatar_url() ); + $this->assertStringContainsString( 'gravatar.com/avatar', $customer->get_avatar_url() ); + $this->assertStringContainsString( md5( 'test@woo.local' ), $customer->get_avatar_url() ); } /** diff --git a/plugins/woocommerce/tests/legacy/unit-tests/customer/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/customer/functions.php index d97b091d6f6..c3c33acd987 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/customer/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/customer/functions.php @@ -14,7 +14,7 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case { /** * Perform any common setup work. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // For these tests, we are not concerned with Approved Download Directory functionality. @@ -66,11 +66,11 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case { $id = wc_create_new_customer( 'fred@mail.com', '', 'testpassword' ); $userdata = get_userdata( $id ); $this->assertNotEquals( 'fred', $userdata->user_login ); - $this->assertContains( 'fred', $userdata->user_login ); + $this->assertStringContainsString( 'fred', $userdata->user_login ); $id = wc_create_new_customer( 'fred@test.com', '', 'testpassword' ); $userdata = get_userdata( $id ); $this->assertNotEquals( 'fred', $userdata->user_login ); - $this->assertContains( 'fred', $userdata->user_login ); + $this->assertStringContainsString( 'fred', $userdata->user_login ); // Test extra arguments to generate display_name. $id = wc_create_new_customer( @@ -107,7 +107,7 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case { wc_create_new_customer( 'mike@fakemail.com', '', 'testpassword' ); $username = wc_create_new_customer_username( 'mike@fakemail.com', array() ); $this->assertNotEquals( 'mike', $username, $username ); - $this->assertContains( 'mike', $username, $username ); + $this->assertStringContainsString( 'mike', $username, $username ); // Test common email prefix avoidance. $this->assertEquals( 'somecompany.com', wc_create_new_customer_username( 'info@somecompany.com', array() ) ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/discounts/discounts.php b/plugins/woocommerce/tests/legacy/unit-tests/discounts/discounts.php index fbf0673e270..070fa56d1b3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/discounts/discounts.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/discounts/discounts.php @@ -62,7 +62,7 @@ class WC_Tests_Discounts extends WC_Unit_Test_Case { /** * Setup tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->products = array(); @@ -74,7 +74,7 @@ class WC_Tests_Discounts extends WC_Unit_Test_Case { /** * Clean up after each test. DB changes are reverted in parent::tearDown(). */ - public function tearDown() { + public function tearDown(): void { WC()->cart->empty_cart(); WC()->cart->remove_coupons(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/email/emails.php b/plugins/woocommerce/tests/legacy/unit-tests/email/emails.php index 6e55c3823ce..40a6b3a6333 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/email/emails.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/email/emails.php @@ -14,7 +14,7 @@ class WC_Tests_WC_Emails extends WC_Unit_Test_Case { /** * Setup tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Load email classes. diff --git a/plugins/woocommerce/tests/legacy/unit-tests/exporter/product.php b/plugins/woocommerce/tests/legacy/unit-tests/exporter/product.php index d0110f39ce7..0e3b7036567 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/exporter/product.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/exporter/product.php @@ -9,7 +9,7 @@ class WC_Tests_Product_CSV_Exporter extends WC_Unit_Test_Case { /** * Load up the exporter classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php index ae237dacf6e..e613d9341ed 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php @@ -15,7 +15,7 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Callback used by WP_HTTP_TestCase to decide whether to perform HTTP requests or to provide a mocked response. diff --git a/plugins/woocommerce/tests/legacy/unit-tests/gateways/paypal/request.php b/plugins/woocommerce/tests/legacy/unit-tests/gateways/paypal/request.php index 04be4982647..bdb00d2ff26 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/gateways/paypal/request.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/gateways/paypal/request.php @@ -81,7 +81,7 @@ class WC_Tests_Paypal_Gateway_Request extends WC_Unit_Test_Case { /** * Initialize the Paypal gateway and Request objects. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/importer/product.php b/plugins/woocommerce/tests/legacy/unit-tests/importer/product.php index c8439b6a8bc..637506ea631 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/importer/product.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/importer/product.php @@ -25,7 +25,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/importer/tax.php b/plugins/woocommerce/tests/legacy/unit-tests/importer/tax.php index 5ecccbe4f13..a3f64b1fc38 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/importer/tax.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/importer/tax.php @@ -16,7 +16,7 @@ class WC_Tests_Tax_CSV_Importer extends WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->csv_file = dirname( __FILE__ ) . '/sample_tax_rates.csv'; diff --git a/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php b/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php index 6e424380a33..a1132d435be 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php @@ -13,7 +13,7 @@ class WC_Tests_MaxMind_Database extends WC_Unit_Test_Case { /** * Run setup code for unit tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Callback used by WP_HTTP_TestCase to decide whether to perform HTTP requests or to provide a mocked response. diff --git a/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-integration.php b/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-integration.php index e7bbbd3e517..c2db6857516 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-integration.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-integration.php @@ -20,7 +20,7 @@ class WC_Tests_MaxMind_Integration extends WC_Unit_Test_Case { /** * Run setup code for unit tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Override the filesystem method that we're using. diff --git a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-db.php b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-db.php index ad776f778bf..41fb7bb813c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-db.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-db.php @@ -6,7 +6,7 @@ * @since 3.0.0 */ class WC_Tests_Log_Handler_DB extends WC_Unit_Test_Case { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->handler = new WC_Log_Handler_DB( array( 'threshold' => 'debug' ) ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-email.php b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-email.php index aef0bbec8c7..f463d3ed211 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-email.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-email.php @@ -15,7 +15,7 @@ class WC_Tests_Log_Handler_Email extends WC_Unit_Test_Case { /** * Test setup. */ - public function setUp() { + public function setUp(): void { parent::setUp(); reset_phpmailer_instance(); } @@ -23,7 +23,7 @@ class WC_Tests_Log_Handler_Email extends WC_Unit_Test_Case { /** * Test teardown. */ - public function tearDown() { + public function tearDown(): void { reset_phpmailer_instance(); parent::tearDown(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-file.php b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-file.php index 60ccbf6212e..062427d815a 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-file.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/log/log-handler-file.php @@ -7,7 +7,7 @@ */ class WC_Tests_Log_Handler_File extends WC_Unit_Test_Case { - public function tearDown() { + public function tearDown(): void { $log_files = array( 'unit-tests', 'log', diff --git a/plugins/woocommerce/tests/legacy/unit-tests/order-items/order-item-meta.php b/plugins/woocommerce/tests/legacy/unit-tests/order-items/order-item-meta.php index 306b7dc7c89..0239739f85c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/order-items/order-item-meta.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/order-items/order-item-meta.php @@ -10,7 +10,7 @@ class WC_Tests_Order_Item_Meta extends WC_Unit_Test_Case { /** * Suppress deprecation notice from WC_Order_Item_Meta constructor. */ - public function setUp() { + public function setUp(): void { parent::setUp(); wp_insert_term( 'Testing Categories', 'category', array( 'slug' => 'testing' ) ); @@ -86,9 +86,9 @@ class WC_Tests_Order_Item_Meta extends WC_Unit_Test_Case { $this->assertEquals( $expected, $flat ); $not_flat = $meta->display( false, true ); - $this->assertContains( 'class="variation-regularkey">regularkey:', $not_flat ); - $this->assertContains( 'class="variation-regularkey">1
', $not_flat ); - $this->assertContains( 'class="variation-category">category:', $not_flat ); - $this->assertContains( 'class="variation-category">Testing Categories
', $not_flat ); + $this->assertStringContainsString( 'class="variation-regularkey">regularkey:', $not_flat ); + $this->assertStringContainsString( 'class="variation-regularkey">1
', $not_flat ); + $this->assertStringContainsString( 'class="variation-category">category:', $not_flat ); + $this->assertStringContainsString( 'class="variation-category">Testing Categories
', $not_flat ); } } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-crud-orders.php b/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-crud-orders.php index 907006c03ce..1d6a917bc02 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-crud-orders.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-crud-orders.php @@ -25,7 +25,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { */ public function test_get_data() { $object = new WC_Order(); - $this->assertInternalType( 'array', $object->get_data() ); + $this->assertIsArray( $object->get_data() ); } /** @@ -929,7 +929,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { ) ) ); - $this->assertContains( 'Payment complete event failed', $note->content ); + $this->assertStringContainsString( 'Payment complete event failed', $note->content ); remove_action( 'woocommerce_payment_complete', array( $this, 'throwAnException' ) ); } @@ -984,7 +984,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { ) ) ); - $this->assertContains( 'Update status event failed', $note->content ); + $this->assertStringContainsString( 'Update status event failed', $note->content ); remove_filter( 'woocommerce_payment_complete_order_status', array( $this, 'throwAnException' ) ); } @@ -1008,7 +1008,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { ) ); - $this->assertContains( __( 'Error during status transition.', 'woocommerce' ), $note->content ); + $this->assertStringContainsString( __( 'Error during status transition.', 'woocommerce' ), $note->content ); } /** @@ -1635,7 +1635,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { */ public function test_get_cancel_order_url() { $object = new WC_Order(); - $this->assertInternalType( 'string', $object->get_cancel_order_url() ); + $this->assertIsString( $object->get_cancel_order_url() ); } /** @@ -1643,7 +1643,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { */ public function test_get_cancel_order_url_raw() { $object = new WC_Order(); - $this->assertInternalType( 'string', $object->get_cancel_order_url_raw() ); + $this->assertIsString( $object->get_cancel_order_url_raw() ); } /** @@ -1977,7 +1977,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { ) ) ); - $this->assertContains( 'Error saving order', $note->content ); + $this->assertStringContainsString( 'Error saving order', $note->content ); remove_action( 'woocommerce_before_order_object_save', array( $this, 'throwAnException' ) ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/cod.php b/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/cod.php index 8dea53d70e5..fb8edb0e136 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/cod.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/cod.php @@ -15,7 +15,7 @@ class WC_Tests_Payment_Gateway_COD extends WC_Unit_Test_Case { /** * Clean up after each test. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); Constants::clear_constants(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/payment-gateways.php b/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/payment-gateways.php index 3428db4971d..960b4aeb066 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/payment-gateways.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/payment-gateways/payment-gateways.php @@ -11,7 +11,7 @@ class WC_Tests_Payment_Gateway extends WC_Unit_Test_Case { /** * Setup, enable payment gateways Cash on delivery and direct bank deposit. */ - public function setUp() { + public function setUp(): void { parent::setUp(); WC()->session = null; $wc_payment_gateways = WC_Payment_Gateways::instance(); @@ -26,7 +26,7 @@ class WC_Tests_Payment_Gateway extends WC_Unit_Test_Case { /** * Initialize session that some tests might have removed. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); WC()->initialize_session(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/payment-tokens/payment-tokens.php b/plugins/woocommerce/tests/legacy/unit-tests/payment-tokens/payment-tokens.php index 77733684611..92f607d6df2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/payment-tokens/payment-tokens.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/payment-tokens/payment-tokens.php @@ -15,7 +15,7 @@ class WC_Tests_Payment_Tokens extends WC_Unit_Test_Case { * * @see WC_Unit_Test_Case::setUp() */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user_id = $this->login_as_role( 'shop_manager' ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/privacy/export.php b/plugins/woocommerce/tests/legacy/unit-tests/privacy/export.php index 68d8b7fe85a..8aca20e4577 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/privacy/export.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/privacy/export.php @@ -27,7 +27,7 @@ class WC_Test_Privacy_Export extends WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $customer1 = WC_Helper_Customer::create_customer( 'customer1', 'password', 'test1@test.com' ); @@ -143,7 +143,7 @@ class WC_Test_Privacy_Export extends WC_Unit_Test_Case { $this->assertEquals( 'woocommerce_orders', $response['data'][0]['group_id'] ); $this->assertEquals( 'Orders', $response['data'][0]['group_label'] ); - $this->assertContains( 'order-', $response['data'][0]['item_id'] ); + $this->assertStringContainsString( 'order-', $response['data'][0]['item_id'] ); $this->assertArrayHasKey( 'data', $response['data'][0] ); $this->assertTrue( 8 === count( $response['data'][0]['data'] ), count( $response['data'][0]['data'] ) ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/product/class-wc-tests-product.php b/plugins/woocommerce/tests/legacy/unit-tests/product/class-wc-tests-product.php index 182f238cd1d..2753bcef6d2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/product/class-wc-tests-product.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/product/class-wc-tests-product.php @@ -20,7 +20,7 @@ class WC_Tests_Product extends WC_Unit_Test_Case { /** * Runs before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->product = new WC_Product(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/product/data.php b/plugins/woocommerce/tests/legacy/unit-tests/product/data.php index 09c5f78ea57..10590f71414 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/product/data.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/product/data.php @@ -278,17 +278,17 @@ class WC_Tests_Product_Data extends WC_Unit_Test_Case { $image = $this->set_product_image( $product ); $needle = 'width="186" height="144" src="' . $image['url'] . '" class="%s"'; - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'attachment-woocommerce_thumbnail size-woocommerce_thumbnail' ), $product->get_image() ); - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'attachment-single size-single' ), $product->get_image( 'single' ) ); - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'custom-class' ), $product->get_image( 'single', array( 'class' => 'custom-class' ) ) ); @@ -306,17 +306,17 @@ class WC_Tests_Product_Data extends WC_Unit_Test_Case { $image = $this->set_product_image( $variable_product ); $needle = 'width="186" height="144" src="' . $image['url'] . '" class="%s"'; - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'attachment-woocommerce_thumbnail size-woocommerce_thumbnail' ), $variation_1->get_image() ); - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'attachment-single size-single' ), $variation_1->get_image( 'single' ) ); - $this->assertContains( + $this->assertStringContainsString( sprintf( $needle, 'custom-class' ), $variation_1->get_image( 'single', array( 'class' => 'custom-class' ) ) ); @@ -330,11 +330,11 @@ class WC_Tests_Product_Data extends WC_Unit_Test_Case { public function test_get_image_should_return_place_holder_image() { $product = new WC_Product(); - $this->assertContains( wc_placeholder_img_src(), $product->get_image() ); + $this->assertStringContainsString( wc_placeholder_img_src(), $product->get_image() ); // Test custom class attribute is honoured. $image = $product->get_image( 'woocommerce_thumbnail', array( 'class' => 'custom-class' ) ); - $this->assertContains( 'class="custom-class"', $image ); + $this->assertStringContainsString( 'class="custom-class"', $image ); } /** diff --git a/plugins/woocommerce/tests/legacy/unit-tests/product/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/product/functions.php index 6146b414418..0b10a963ae1 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/product/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/product/functions.php @@ -904,7 +904,7 @@ class WC_Tests_Product_Functions extends WC_Unit_Test_Case { // Test custom class attribute is honoured. $attr = array( 'class' => 'custom-class' ); - $this->assertContains( 'class="custom-class"', wc_placeholder_img( 'woocommerce_thumbnail', $attr ) ); + $this->assertStringContainsString( 'class="custom-class"', wc_placeholder_img( 'woocommerce_thumbnail', $attr ) ); } /** @@ -926,10 +926,9 @@ class WC_Tests_Product_Functions extends WC_Unit_Test_Case { $this->assertEquals( $product_types, wc_get_product_types() ); } - /** - * @expectedException WC_Data_Exception - */ public function test_wc_product_has_unique_sku() { + $this->expectException( WC_Data_Exception::class ); + $product_1 = WC_Helper_Product::create_simple_product(); $this->assertTrue( wc_product_has_unique_sku( $product_1->get_id(), $product_1->get_sku() ) ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/product/product-simple.php b/plugins/woocommerce/tests/legacy/unit-tests/product/product-simple.php index c6a13677d02..fd1780943d0 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/product/product-simple.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/product/product-simple.php @@ -12,7 +12,7 @@ class WC_Tests_Product_Simple extends WC_Unit_Test_Case { */ protected $product; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->product = WC_Helper_Product::create_simple_product(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/AbstractRestApiTest.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/AbstractRestApiTest.php index 51995975126..c93352f50e2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/AbstractRestApiTest.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/AbstractRestApiTest.php @@ -70,7 +70,7 @@ abstract class AbstractRestApiTest extends WC_REST_Unit_Test_Case { /** * Setup test class. */ - public function setUp() { + public function setUp(): void { parent::setUp(); wp_set_current_user( self::$user ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/coupons.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/coupons.php index a27af8ff246..8c1c1d50297 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/coupons.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/coupons.php @@ -12,7 +12,7 @@ class WC_Tests_API_Coupons_V2 extends WC_REST_Unit_Test_Case { * Setup test coupon data. * @since 3.0.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Coupons_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/customers.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/customers.php index 94367a3c5bf..97a8d7d6773 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/customers.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/customers.php @@ -17,7 +17,7 @@ class Customers_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Customers_Controller(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/orders.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/orders.php index f5bbfe66bff..ead32b074f4 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/orders.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/orders.php @@ -20,7 +20,7 @@ class WC_Tests_API_Orders_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Orders_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/payment-gateways.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/payment-gateways.php index 9efbcc582b0..be3a8b09dfc 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/payment-gateways.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/payment-gateways.php @@ -14,7 +14,7 @@ class Payment_Gateways_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Payment_Gateways_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-reviews.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-reviews.php index b0f9ebd0a48..df53aeece57 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-reviews.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-reviews.php @@ -11,7 +11,7 @@ class WC_Tests_API_Product_Reviews_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-variations.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-variations.php index 560e88693ad..60e80e583f3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-variations.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/product-variations.php @@ -12,7 +12,7 @@ class Product_Variations_API_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Product_Variations_Controller(); $this->user = $this->factory->user->create( @@ -207,14 +207,14 @@ class Product_Variations_API_V2 extends WC_REST_Unit_Test_Case { $variation = $response->get_data(); $this->assertTrue( isset( $variation['description'] ), print_r( $variation, true ) ); - $this->assertContains( 'O_O', $variation['description'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'O_O', $variation['description'], print_r( $variation, true ) ); $this->assertEquals( '8', $variation['price'], print_r( $variation, true ) ); $this->assertEquals( '8', $variation['sale_price'], print_r( $variation, true ) ); $this->assertEquals( '10', $variation['regular_price'], print_r( $variation, true ) ); $this->assertEquals( 'FIXED-SKU', $variation['sku'], print_r( $variation, true ) ); $this->assertEquals( 'medium', $variation['attributes'][0]['option'], print_r( $variation, true ) ); - $this->assertContains( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) ); - $this->assertContains( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) ); wp_delete_attachment( $variation['image']['id'], true ); } @@ -288,7 +288,7 @@ class Product_Variations_API_V2 extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $variation = $response->get_data(); - $this->assertContains( 'A medium size.', $variation['description'] ); + $this->assertStringContainsString( 'A medium size.', $variation['description'] ); $this->assertEquals( '12', $variation['price'] ); $this->assertEquals( '12', $variation['regular_price'] ); $this->assertTrue( $variation['purchasable'] ); @@ -382,7 +382,7 @@ class Product_Variations_API_V2 extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Updated description.', $data['update'][0]['description'] ); + $this->assertStringContainsString( 'Updated description.', $data['update'][0]['description'] ); $this->assertEquals( 'DUMMY SKU VARIABLE MEDIUM', $data['create'][0]['sku'] ); $this->assertEquals( 'medium', $data['create'][0]['attributes'][0]['option'] ); $this->assertEquals( $children[1], $data['delete'][0]['id'] ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/products.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/products.php index ea67735ae4e..dfe3fbb54b6 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/products.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/products.php @@ -14,7 +14,7 @@ class Products_API_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Products_Controller(); $this->user = $this->factory->user->create( @@ -188,13 +188,13 @@ class Products_API_V2 extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Testing', $data['description'] ); + $this->assertStringContainsString( 'Testing', $data['description'] ); $this->assertEquals( '8', $data['price'] ); $this->assertEquals( '8', $data['sale_price'] ); $this->assertEquals( '10', $data['regular_price'] ); $this->assertEquals( 'FIXED-SKU', $data['sku'] ); - $this->assertContains( 'Dr1Bczxq4q', $data['images'][0]['src'] ); - $this->assertContains( 'test upload image', $data['images'][0]['alt'] ); + $this->assertStringContainsString( 'Dr1Bczxq4q', $data['images'][0]['src'] ); + $this->assertStringContainsString( 'test upload image', $data['images'][0]['alt'] ); $product->delete( true ); wp_delete_attachment( $data['images'][0]['id'], true ); @@ -454,7 +454,7 @@ class Products_API_V2 extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Updated description.', $data['update'][0]['description'] ); + $this->assertStringContainsString( 'Updated description.', $data['update'][0]['description'] ); $this->assertEquals( 'DUMMY SKU BATCH TEST 1', $data['create'][0]['sku'] ); $this->assertEquals( 'DUMMY SKU BATCH TEST 2', $data['create'][1]['sku'] ); $this->assertEquals( 'Test Button', $data['create'][0]['button_text'] ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/settings.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/settings.php index 6117fdc87e0..9c6950ac1d6 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/settings.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/settings.php @@ -14,7 +14,7 @@ class Settings_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Setting_Options_Controller(); \Automattic\WooCommerce\RestApi\UnitTests\Helpers\SettingsHelper::register(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-methods.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-methods.php index 65c153e8f31..3f13ecb2ee1 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-methods.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-methods.php @@ -11,7 +11,7 @@ class Shipping_Methods_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Shipping_Methods_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-zones.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-zones.php index 1d9ea5368d3..bc020791d02 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-zones.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/shipping-zones.php @@ -18,7 +18,7 @@ class WC_Tests_API_Shipping_Zones_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Shipping_Zones_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/system-status.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/system-status.php index cb359b0630b..041a3af8144 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/system-status.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version2/system-status.php @@ -16,7 +16,7 @@ class WC_Tests_REST_System_Status_V2 extends WC_REST_Unit_Test_Case { /** * Setup our test server. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_System_Status_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/coupons.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/coupons.php index 3b1aa0e9b36..03a41651159 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/coupons.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/coupons.php @@ -25,7 +25,7 @@ class WC_Tests_API_Coupons extends WC_REST_Unit_Test_Case { * Setup test coupon data. * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Coupons_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/customers.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/customers.php index 43ae89e1229..945128c18b3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/customers.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/customers.php @@ -17,7 +17,7 @@ class Customers extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Customers_Controller(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/orders.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/orders.php index aa568baf3e8..794c313757f 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/orders.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/orders.php @@ -28,7 +28,7 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case { /** * Setup our test server. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Orders_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/payment-gateways.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/payment-gateways.php index 8d272644a3d..4bddc3f5a0e 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/payment-gateways.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/payment-gateways.php @@ -14,7 +14,7 @@ class Payment_Gateways extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Payment_Gateways_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-reviews.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-reviews.php index c277b0e2d7d..11aa94c16b7 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-reviews.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-reviews.php @@ -11,7 +11,7 @@ class WC_Tests_API_Product_Reviews extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-variations.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-variations.php index b0a3e805094..640ee350b03 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-variations.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/product-variations.php @@ -14,7 +14,7 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Product_Variations_Controller(); $this->user = $this->factory->user->create( @@ -209,14 +209,14 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { $variation = $response->get_data(); $this->assertTrue( isset( $variation['description'] ), print_r( $variation, true ) ); - $this->assertContains( 'O_O', $variation['description'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'O_O', $variation['description'], print_r( $variation, true ) ); $this->assertEquals( '8', $variation['price'], print_r( $variation, true ) ); $this->assertEquals( '8', $variation['sale_price'], print_r( $variation, true ) ); $this->assertEquals( '10', $variation['regular_price'], print_r( $variation, true ) ); $this->assertEquals( 'FIXED-\'SKU', $variation['sku'], print_r( $variation, true ) ); $this->assertEquals( 'medium', $variation['attributes'][0]['option'], print_r( $variation, true ) ); - $this->assertContains( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) ); - $this->assertContains( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) ); + $this->assertStringContainsString( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) ); wp_delete_attachment( $variation['image']['id'], true ); } @@ -290,7 +290,7 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $variation = $response->get_data(); - $this->assertContains( 'A medium size.', $variation['description'] ); + $this->assertStringContainsString( 'A medium size.', $variation['description'] ); $this->assertEquals( '12', $variation['price'] ); $this->assertEquals( '12', $variation['regular_price'] ); $this->assertTrue( $variation['purchasable'] ); @@ -373,7 +373,7 @@ class Product_Variations_API extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Updated description.', $data['update'][0]['description'] ); + $this->assertStringContainsString( 'Updated description.', $data['update'][0]['description'] ); $this->assertEquals( 'DUMMY SKU VARIABLE MEDIUM', $data['create'][0]['sku'] ); $this->assertEquals( 'medium', $data['create'][0]['attributes'][0]['option'] ); $this->assertEquals( $children[1], $data['delete'][0]['id'] ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/products.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/products.php index 17006c32598..dd78f483623 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/products.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/products.php @@ -19,7 +19,7 @@ class WC_Tests_API_Product extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Products_Controller(); $this->user = $this->factory->user->create( @@ -248,14 +248,14 @@ class WC_Tests_API_Product extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Testing', $data['description'] ); + $this->assertStringContainsString( 'Testing', $data['description'] ); $this->assertEquals( '8', $data['price'] ); $this->assertEquals( '8', $data['sale_price'] ); $this->assertEquals( '10', $data['regular_price'] ); $this->assertEquals( 'FIXED-SKU', $data['sku'] ); $this->assertEquals( $date_created, $data['date_created'] ); - $this->assertContains( 'Dr1Bczxq4q', $data['images'][0]['src'] ); - $this->assertContains( 'test upload image', $data['images'][0]['alt'] ); + $this->assertStringContainsString( 'Dr1Bczxq4q', $data['images'][0]['src'] ); + $this->assertStringContainsString( 'test upload image', $data['images'][0]['alt'] ); $product->delete( true ); wp_delete_attachment( $data['images'][0]['id'], true ); @@ -569,7 +569,7 @@ class WC_Tests_API_Product extends WC_REST_Unit_Test_Case { $response = $this->server->dispatch( $request ); $data = $response->get_data(); - $this->assertContains( 'Updated description.', $data['update'][0]['description'] ); + $this->assertStringContainsString( 'Updated description.', $data['update'][0]['description'] ); $this->assertEquals( 'DUMMY SKU BATCH TEST 1', $data['create'][0]['sku'] ); $this->assertEquals( 'DUMMY SKU BATCH TEST 2', $data['create'][1]['sku'] ); $this->assertEquals( 'Test Button', $data['create'][0]['button_text'] ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-coupons-totals.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-coupons-totals.php index 162b8af7ef7..a85b0d4c91f 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-coupons-totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-coupons-totals.php @@ -11,7 +11,7 @@ class WC_Tests_API_Reports_Coupons_Totals extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-customers-totals.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-customers-totals.php index cd0e58f886f..4c2f49f815a 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-customers-totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-customers-totals.php @@ -11,7 +11,7 @@ class WC_Tests_API_Reports_Customers_Totals extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-orders-totals.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-orders-totals.php index 93a21a87634..95e1ec02632 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-orders-totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-orders-totals.php @@ -11,7 +11,7 @@ class WC_Tests_API_Reports_Orders_Totals extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-products-totals.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-products-totals.php index 6243786ffad..bba7aef9e29 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-products-totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-products-totals.php @@ -11,7 +11,7 @@ class WC_Tests_API_Reports_Products_Totals extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-reviews-totals.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-reviews-totals.php index 3a2dc1622ff..2c2a915f5e1 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-reviews-totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/reports-reviews-totals.php @@ -11,7 +11,7 @@ class WC_Tests_API_Reports_Reviews_Totals extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/settings.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/settings.php index daf907a7d8a..d82cc9b5ad8 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/settings.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/settings.php @@ -14,7 +14,7 @@ class Settings extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Setting_Options_Controller(); \Automattic\WooCommerce\RestApi\UnitTests\Helpers\SettingsHelper::register(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-methods.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-methods.php index ad139c427af..31dc36c1b14 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-methods.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-methods.php @@ -11,7 +11,7 @@ class Shipping_Methods extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Shipping_Methods_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-zones.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-zones.php index a735357b41f..1dd58034653 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-zones.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/shipping-zones.php @@ -19,7 +19,7 @@ class WC_Tests_API_Shipping_Zones extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Shipping_Zones_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/system-status.php b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/system-status.php index 7aa77fbde02..8d8333a5b52 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/system-status.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/rest-api/Tests/Version3/system-status.php @@ -36,7 +36,7 @@ class WC_Tests_REST_System_Status extends WC_REST_Unit_Test_Case { /** * Setup our test server. */ - public function setUp() { + public function setUp(): void { parent::setUp(); wp_set_current_user( self::$user ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/session/class-wc-tests-session-handler.php b/plugins/woocommerce/tests/legacy/unit-tests/session/class-wc-tests-session-handler.php index bb60510722d..c51e3ad8b83 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/session/class-wc-tests-session-handler.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/session/class-wc-tests-session-handler.php @@ -13,7 +13,7 @@ class WC_Tests_Session_Handler extends WC_Unit_Test_Case { /** * Setup. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->handler = new WC_Session_Handler(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/settings/register-wp-admin-settings.php b/plugins/woocommerce/tests/legacy/unit-tests/settings/register-wp-admin-settings.php index 2d8284e813a..2e29350bfb6 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/settings/register-wp-admin-settings.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/settings/register-wp-admin-settings.php @@ -23,7 +23,7 @@ class WC_Tests_Register_WP_Admin_Settings extends WC_Unit_Test_Case { /** * Initialize a WC_Settings_Page for testing */ - public function setUp() { + public function setUp(): void { parent::setUp(); $mock_page = $this->getMockBuilder( 'WC_Settings_General' )->getMock(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zone.php b/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zone.php index 99d7dac7c99..da5f7fbdff3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zone.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zone.php @@ -14,7 +14,7 @@ class WC_Tests_Shipping_Zone extends WC_Unit_Test_Case { /** * Set up tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); WC_Helper_Shipping_Zones::create_mock_zones(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zones.php b/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zones.php index 9e1a4d439a3..c08c4d099d9 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zones.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/shipping/shipping-zones.php @@ -14,7 +14,7 @@ class WC_Tests_Shipping_Zones extends WC_Unit_Test_Case { /** * Set up tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); WC_Helper_Shipping_Zones::create_mock_zones(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/totals/totals.php b/plugins/woocommerce/tests/legacy/unit-tests/totals/totals.php index 71cca3b3279..59c8295cfc4 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/totals/totals.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/totals/totals.php @@ -27,7 +27,7 @@ class WC_Tests_Totals extends WC_Unit_Test_Case { /** * Setup the cart for totals calculation. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Set a valid address for the customer so shipping rates will calculate. @@ -115,7 +115,7 @@ class WC_Tests_Totals extends WC_Unit_Test_Case { /** * Clean up after test. */ - public function tearDown() { + public function tearDown(): void { WC()->cart->empty_cart(); WC()->session->set( 'chosen_shipping_methods', array() ); WC_Helper_Shipping::delete_simple_flat_rate(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/api-functions.php b/plugins/woocommerce/tests/legacy/unit-tests/util/api-functions.php index 7a6a64a64bb..adc6d19874c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/api-functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/api-functions.php @@ -29,7 +29,7 @@ class WC_Tests_API_Functions extends WC_Unit_Test_Case { /** * Run setup code for unit tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Callback used by WP_HTTP_TestCase to decide whether to perform HTTP requests or to provide a mocked response. @@ -44,7 +44,7 @@ class WC_Tests_API_Functions extends WC_Unit_Test_Case { /** * Run tear down code for unit tests. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); // remove files created in the wc_rest_upload_image_from_url() tests. @@ -124,8 +124,7 @@ class WC_Tests_API_Functions extends WC_Unit_Test_Case { * @since 2.6.0 */ public function test_wc_rest_set_uploaded_image_as_attachment() { - $this->assertInternalType( - 'int', + $this->assertIsInt( wc_rest_set_uploaded_image_as_attachment( array( 'file' => '', diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-rate-limiter.php b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-rate-limiter.php index 703a475467e..86fbe760083 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-rate-limiter.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-rate-limiter.php @@ -15,14 +15,14 @@ class WC_Tests_Rate_Limiter extends WC_Unit_Test_Case { /** * Run setup code for unit tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); } /** * Run tear down code for unit tests. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php index 6f2c17b7d5e..6e49895fa38 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php @@ -18,7 +18,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { * * @return void */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->wc = WC(); } @@ -229,7 +229,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { // Each case. foreach ( array_keys( get_woocommerce_currencies() ) as $currency_code ) { - $this->assertInternalType( 'string', get_woocommerce_currency_symbol( $currency_code ) ); + $this->assertIsString( get_woocommerce_currency_symbol( $currency_code ) ); } } @@ -728,14 +728,14 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { ob_start(); wc_print_js(); $printed_js = ob_get_clean(); - $this->assertNotContains( $js, $printed_js ); + $this->assertStringNotContainsString( $js, $printed_js ); wc_enqueue_js( $js ); ob_start(); wc_print_js(); $printed_js = ob_get_clean(); - $this->assertContains( $js, $printed_js ); + $this->assertStringContainsString( $js, $printed_js ); } /** diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/deprecated-hooks.php b/plugins/woocommerce/tests/legacy/unit-tests/util/deprecated-hooks.php index 6d93a50942d..44afd951df1 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/deprecated-hooks.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/deprecated-hooks.php @@ -51,7 +51,7 @@ class WC_Tests_Deprecated_Hooks extends WC_Unit_Test_Case { /** * Disable deprecation error trigger for this class. */ - public function setUp() { + public function setUp(): void { parent::setUp(); add_filter( 'deprecated_function_trigger_error', '__return_false' ); add_filter( 'deprecated_hook_trigger_error', '__return_false' ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/notice-functions.php b/plugins/woocommerce/tests/legacy/unit-tests/util/notice-functions.php index d150ae16022..a213ecc4d8b 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/notice-functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/notice-functions.php @@ -15,7 +15,7 @@ class WC_Tests_Notice_Functions extends WC_Unit_Test_Case { * * @since 2.2 */ - public function tearDown() { + public function tearDown(): void { WC()->session->set( 'wc_notices', null ); } @@ -197,7 +197,7 @@ class WC_Tests_Notice_Functions extends WC_Unit_Test_Case { // No notices. $notices = wc_get_notices(); - $this->assertInternalType( 'array', $notices ); + $this->assertIsArray( $notices ); $this->assertEmpty( $notices ); // Default type. @@ -228,7 +228,7 @@ class WC_Tests_Notice_Functions extends WC_Unit_Test_Case { // Invalid type. $notices = wc_get_notices( 'bogus_type' ); - $this->assertInternalType( 'array', $notices ); + $this->assertIsArray( $notices ); $this->assertEmpty( $notices ); } } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/plugin-updates.php b/plugins/woocommerce/tests/legacy/unit-tests/util/plugin-updates.php index 9d5b12604b5..ff0976b67da 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/util/plugin-updates.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/util/plugin-updates.php @@ -23,7 +23,7 @@ class WC_Tests_Plugin_Updates extends WC_Unit_Test_Case { * * @since 3.2.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); if ( ! class_exists( 'WC_Plugin_Updates' ) ) { diff --git a/plugins/woocommerce/tests/legacy/unit-tests/webhooks/crud.php b/plugins/woocommerce/tests/legacy/unit-tests/webhooks/crud.php index 479cb61b504..4694d6a7dac 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/webhooks/crud.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/webhooks/crud.php @@ -24,7 +24,7 @@ class WC_Tests_CRUD_Webhooks extends WC_Unit_Test_Case { */ public function test_get_data() { $object = new WC_Webhook(); - $this->assertInternalType( 'array', $object->get_data() ); + $this->assertIsArray( $object->get_data() ); } /** diff --git a/plugins/woocommerce/tests/legacy/unit-tests/webhooks/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/webhooks/functions.php index b36fb6ef23e..a4508ce0402 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/webhooks/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/webhooks/functions.php @@ -154,10 +154,9 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case { $this->assertFalse( wc_load_webhooks( $status ) ); } - /** - * @expectedException InvalidArgumentException - */ public function test_wc_load_webhooks_status_invalid() { + $this->expectException( InvalidArgumentException::class ); + wc_load_webhooks( 'invalid_status' ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api-init.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api-init.php index 9b8af6ded34..68a569bdbb9 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api-init.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api-init.php @@ -17,7 +17,7 @@ class WC_Admin_Tests_API_Init extends WC_REST_Unit_Test_Case { /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->queue = new WC_Admin_Test_Action_Queue(); CustomersScheduler::set_queue( $this->queue ); @@ -27,7 +27,7 @@ class WC_Admin_Tests_API_Init extends WC_REST_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); CustomersScheduler::set_queue( null ); OrdersScheduler::set_queue( null ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/admin-notes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/admin-notes.php index 87e6c9affd6..6a970b51f62 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/admin-notes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/admin-notes.php @@ -25,7 +25,7 @@ class WC_Admin_Tests_API_Admin_Notes extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/data.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/data.php index 9dc9321f273..35829f546c7 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/data.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/data.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Data extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/experiments.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/experiments.php index ab28daaeea8..b069e95c8fe 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/experiments.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/experiments.php @@ -22,7 +22,7 @@ class WC_Admin_Tests_API_Experiments extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/leaderboards.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/leaderboards.php index e5d039c972c..4c81574685d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/leaderboards.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/leaderboards.php @@ -19,7 +19,7 @@ class WC_Admin_Tests_API_Leaderboards extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-product-types.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-product-types.php index 23d39843a21..d53ed157f4b 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-product-types.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-product-types.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Onboarding_Product_Types extends WC_REST_Unit_Test_Case /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-profile.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-profile.php index 365893f6ede..10dedabd5d5 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-profile.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-profile.php @@ -25,7 +25,7 @@ class WC_Admin_Tests_API_Onboarding_Profiles extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-tasks.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-tasks.php index 6cd8bdc88d4..485602787a2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-tasks.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-tasks.php @@ -33,7 +33,7 @@ class WC_Admin_Tests_API_Onboarding_Tasks extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( @@ -59,7 +59,7 @@ class WC_Admin_Tests_API_Onboarding_Tasks extends WC_REST_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->remove_color_or_logo_attribute_taxonomy(); TaskLists::clear_lists(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-themes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-themes.php index 3bb563b6c8b..b942bc3a01c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-themes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/onboarding-themes.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Onboarding_Themes extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/options.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/options.php index 3558011ba93..886319f8bbd 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/options.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/options.php @@ -22,7 +22,7 @@ class WC_Admin_Tests_API_Options extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/orders.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/orders.php index 270f4cf1340..fdfbe945678 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/orders.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/orders.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Orders extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/plugins.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/plugins.php index 3d23adf9cf4..81b81930ff8 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/plugins.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/plugins.php @@ -22,7 +22,7 @@ class WC_Admin_Tests_API_Plugins extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-attributes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-attributes.php index 0c658cf37cf..8cf9126aeac 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-attributes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-attributes.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Product_Attributes extends WC_REST_Unit_Test_Case { /** * Setup test user. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( @@ -41,7 +41,7 @@ class WC_Admin_Tests_API_Product_Attributes extends WC_REST_Unit_Test_Case { /** * Setup test product attributes data. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); // Use the test helper to populate some global attributes. diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-reviews.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-reviews.php index 1b379a4c710..d06d8266171 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-reviews.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/product-reviews.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Product_Reviews extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products-lowinstock.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products-lowinstock.php index 581a10ba4f3..b85177b3221 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products-lowinstock.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products-lowinstock.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_ProductsLowInStock extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products.php index d1a3164b4ec..1be25746d51 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/products.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Products extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/report-controllers.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/report-controllers.php index 622e399b902..9be73935d6a 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/report-controllers.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/report-controllers.php @@ -18,7 +18,7 @@ class WC_Admin_Tests_API_Report_Controllers extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-categories.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-categories.php index 98cbc8a7d27..f5f37b9404d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-categories.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-categories.php @@ -25,7 +25,7 @@ class WC_Admin_Tests_API_Reports_Categories extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons-stats.php index b46bc172f2e..9ebdcb6db25 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons-stats.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Coupons_Stats extends WC_REST_Unit_Test_Case { /** * Setup test reports products stats data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons.php index 6c3994cfc63..ee8d5271552 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-coupons.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Coupons extends WC_REST_Unit_Test_Case { /** * Setup test reports products data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers-stats.php index 57a6346cb24..6b37bcddc92 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers-stats.php @@ -27,7 +27,7 @@ class WC_Admin_Tests_API_Reports_Customers_Stats extends WC_REST_Unit_Test_Case * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers.php index a48cd0955fc..e42f999a66c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-customers.php @@ -29,7 +29,7 @@ class WC_Admin_Tests_API_Reports_Customers extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads-stats.php index d8703988202..5e17074abd4 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads-stats.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Downloads_Stats extends WC_REST_Unit_Test_Case /** * Setup test reports downloads data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads.php index 256e2594b9a..f87beb63bcf 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-downloads.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Downloads extends WC_REST_Unit_Test_Case { /** * Setup test reports downloads data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-export.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-export.php index a542faf153f..48494f8fcf0 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-export.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-export.php @@ -29,7 +29,7 @@ class WC_Admin_Tests_API_Reports_Export extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-import.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-import.php index 8f01cc398ba..b4a78652004 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-import.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-import.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Reports_Import extends WC_REST_Unit_Test_Case { /** * Setup test reports products data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-interval.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-interval.php index c75d6c9d604..15234a9356e 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-interval.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-interval.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case { /** * Set current local timezone. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::$local_tz = new DateTimeZone( wc_timezone_string() ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders-stats.php index e13161b1496..6b7b657eb5b 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders-stats.php @@ -26,7 +26,7 @@ class WC_Admin_Tests_API_Reports_Orders_Stats extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders.php index 19fafadc80d..6cbb04c3193 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-orders.php @@ -28,7 +28,7 @@ class WC_Admin_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-performance-indicators.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-performance-indicators.php index 6f359eef767..cd1f3ba4b2b 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-performance-indicators.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-performance-indicators.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Performance_Indicators extends WC_REST_Unit_Tes /** * Setup tests. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products-stats.php index 74e754d444a..f203a65b84e 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products-stats.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Reports_Products_Stats extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products.php index 5bc90beae28..9e6aade8a16 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-products.php @@ -26,7 +26,7 @@ class WC_Admin_Tests_API_Reports_Products extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-revenue-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-revenue-stats.php index 8855c62d784..0e8acc9d816 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-revenue-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-revenue-stats.php @@ -30,7 +30,7 @@ class WC_Admin_Tests_API_Reports_Revenue_Stats extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock-stats.php index 4c1ff7f4fc0..00cad0ab502 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock-stats.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Reports_Stock_Stats extends WC_REST_Unit_Test_Case { /** * Setup test reports stock data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock.php index 4f14009bac3..32bca013067 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-stock.php @@ -21,7 +21,7 @@ class WC_Admin_Tests_API_Reports_Stock extends WC_REST_Unit_Test_Case { /** * Setup test reports stock data. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes-stats.php index 537477bfe19..1920b20b029 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes-stats.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Reports_Taxes_Stats extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes.php index 90e00202fd8..095f0bdee6a 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-taxes.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Reports_Taxes extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-variations.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-variations.php index 93cbaacc743..499f2f3293e 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-variations.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/reports-variations.php @@ -23,7 +23,7 @@ class WC_Admin_Tests_API_Reports_Variations extends WC_REST_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->product = new WC_Product_Variable(); $this->product->set_name( 'Variable Product' ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/themes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/themes.php index f49b211c278..c2e99b74808 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/themes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/themes.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Themes extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/variations.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/variations.php index c403505dd69..4acf570b7f3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/variations.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/api/variations.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_API_Variations extends WC_REST_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/batch-queue.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/batch-queue.php index 2f76665d2e5..42406606520 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/batch-queue.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/batch-queue.php @@ -53,7 +53,7 @@ class WC_Admin_Tests_Reports_Regenerate_Batching extends WC_REST_Unit_Test_Case /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->queue = new WC_Admin_Test_Action_Queue(); CustomersScheduler::set_queue( $this->queue ); @@ -64,7 +64,7 @@ class WC_Admin_Tests_Reports_Regenerate_Batching extends WC_REST_Unit_Test_Case /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); CustomersScheduler::set_queue( null ); OrdersScheduler::set_queue( null ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/category-lookup.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/category-lookup.php index 048c7514939..ce001e434cf 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/category-lookup.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/category-lookup.php @@ -24,6 +24,7 @@ class WC_Admin_Tests_Category_Lookup extends WP_UnitTestCase { /** * Setup */ + public function setUp() { delete_transient('wc_installing'); parent::setUp(); @@ -45,7 +46,7 @@ class WC_Admin_Tests_Category_Lookup extends WP_UnitTestCase { /** * Tear Down */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); wp_delete_term( $this->parent_term_id, 'product_cat' ); wp_delete_term( $this->parent2_term_id, 'product_cat' ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/db-updates/class-wc-tests-update-is-read-from-last-read.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/db-updates/class-wc-tests-update-is-read-from-last-read.php index 697579c2743..a2e6900ac35 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/db-updates/class-wc-tests-update-is-read-from-last-read.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/db-updates/class-wc-tests-update-is-read-from-last-read.php @@ -16,7 +16,7 @@ class WC_Admin_Tests_Update_Is_Read_From_Last_Read extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( @@ -35,7 +35,7 @@ class WC_Admin_Tests_Update_Is_Read_From_Last_Read extends WC_Unit_Test_Case { $wpdb->query( " - delete from {$wpdb->prefix}usermeta where meta_key = 'woocommerce_admin_activity_panel_inbox_last_read' + delete from {$wpdb->prefix}usermeta where meta_key = 'woocommerce_admin_activity_panel_inbox_last_read' " ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-ces-tracks.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-ces-tracks.php index d576d672814..f1574ac751b 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-ces-tracks.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-ces-tracks.php @@ -32,7 +32,7 @@ class WC_Admin_Tests_CES_Tracks extends WC_Unit_Test_Case { /** * Overridden setUp method from PHPUnit */ - public function setUp() { + public function setUp(): void { parent::setUp(); update_option( 'woocommerce_allow_tracking', 'yes' ); if ( isset( $GLOBALS['current_screen'] ) ) { @@ -41,7 +41,7 @@ class WC_Admin_Tests_CES_Tracks extends WC_Unit_Test_Case { $GLOBALS['current_screen'] = new CurrentScreenMock(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ( $this->current_screen_backup ) { $GLOBALS['current_screen'] = $this->current_screen_backup; diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-shipping-label-banner-display-rules.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-shipping-label-banner-display-rules.php index ad7984352d7..9744f57fc97 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-shipping-label-banner-display-rules.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/class-wc-tests-shipping-label-banner-display-rules.php @@ -34,7 +34,7 @@ class WC_Admin_Tests_Shipping_Label_Banner_Display_Rules extends WC_Unit_Test_Ca /** * Setup for every single test. */ - public function setUp() { + public function setUp(): void { parent::setup(); update_option( 'woocommerce_default_country', 'US' ); @@ -44,7 +44,7 @@ class WC_Admin_Tests_Shipping_Label_Banner_Display_Rules extends WC_Unit_Test_Ca /** * Setup for the whole test class. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); foreach ( self::$modified_options as $option_name => $option_value ) { @@ -55,7 +55,7 @@ class WC_Admin_Tests_Shipping_Label_Banner_Display_Rules extends WC_Unit_Test_Ca /** * Cleans up test data once all test have run. */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { parent::tearDownAfterClass(); foreach ( self::$modified_options as $option_name => $option_value ) { diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/task-list.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/task-list.php index 1a08da3c359..ede67db4f55 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/task-list.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/task-list.php @@ -24,7 +24,7 @@ class WC_Admin_Tests_OnboardingTasks_TaskList extends WC_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->list = new TaskList( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/purchase.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/purchase.php index 25ee985d644..d8f1f61e9f1 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/purchase.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/purchase.php @@ -25,7 +25,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_Purchase extends WC_Unit_Test_Case { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->task = new Purchase( new TaskList() ); @@ -64,7 +64,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_Purchase extends WC_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); delete_transient( OnboardingThemes::THEMES_TRANSIENT ); delete_option( OnboardingProfile::DATA_OPTION ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/store-details.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/store-details.php index bfc8afdc2c2..f91f57c58f9 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/store-details.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/tasks/store-details.php @@ -25,7 +25,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_StoreDetails extends WC_Unit_Test_Case /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->task_list = new TaskList(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/data-source-poller.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/data-source-poller.php index c1d8616c1b7..1fbdf74d0e0 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/data-source-poller.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/data-source-poller.php @@ -16,7 +16,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_DataSourcePoller extends WC_Unit_ /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); add_filter( @@ -73,7 +73,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_DataSourcePoller extends WC_Unit_ /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); remove_all_filters( DataSourcePoller::FILTER_NAME ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/evaluate-suggestion.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/evaluate-suggestion.php index 4dfc9005bea..89443db9cb7 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/evaluate-suggestion.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/evaluate-suggestion.php @@ -19,7 +19,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_EvaluateSuggestion extends WC_Uni /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); delete_option( self::MOCK_OPTION ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-controller.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-controller.php index d944d180bb3..e148f00dec3 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-controller.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-controller.php @@ -21,7 +21,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_PaymentGatewaysController extends /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-suggestions.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-suggestions.php index 64bc6648c52..15e6fe1be2c 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-suggestions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/payment-gateway-suggestions/payment-gateway-suggestions.php @@ -18,7 +18,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_Init extends WC_Unit_Test_Case { /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); delete_option( 'woocommerce_show_marketplace_suggestions' ); @@ -41,7 +41,7 @@ class WC_Admin_Tests_PaymentGatewaySuggestions_Init extends WC_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); PaymentGatewaySuggestions::delete_specs_transient(); remove_all_filters( 'transient_woocommerce_admin_' . PaymentGatewaySuggestionsDataSourcePoller::ID . '_specs' ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-favorites.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-favorites.php index 870205b4d6a..b33427b814e 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-favorites.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-favorites.php @@ -21,7 +21,7 @@ class WC_Admin_Tests_Navigation_Favorites extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->instance = new Favorites(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-menu.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-menu.php index 488e72f1779..f1cc3d8e0a0 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-menu.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-menu.php @@ -21,7 +21,7 @@ class WC_Admin_Tests_Navigation_Menu extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->instance = new Menu(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-screen.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-screen.php index a5f499a5236..c431a69dd4a 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-screen.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/navigation/class-wc-screen.php @@ -28,7 +28,7 @@ class WC_Admin_Tests_Navigation_Screen extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->instance = new Screen(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-customizing-product-catalog.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-customizing-product-catalog.php index 07f0bfed9f6..a24b4e551b9 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-customizing-product-catalog.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-customizing-product-catalog.php @@ -22,7 +22,7 @@ class WC_Admin_Tests_Customizing_Product_Catalog extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->empty_posts(); $this->instance = new CustomizingProductCatalog(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-email-notes.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-email-notes.php index 6c441c7aa7f..61e3e0974d2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-email-notes.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-email-notes.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_Email_Notes extends WC_Unit_Test_Case { * * @since 3.5.0 */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-newsalesrecord-note.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-newsalesrecord-note.php index b09a28cba60..d5aa59dbedf 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-newsalesrecord-note.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-newsalesrecord-note.php @@ -22,7 +22,7 @@ class WC_Admin_Tests_NewSalesRecord_Note extends WC_Unit_Test_Case { * Set up * @return void */ - public function setUp() { + public function setUp(): void { parent::setUp(); Notes::delete_notes_with_name( NewSalesRecord::NOTE_NAME ); $this->yesterday = gmdate( 'Y-m-d', time() - DAY_IN_SECONDS ); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-notes-data-store.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-notes-data-store.php index b01791854d7..c36be43720d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-notes-data-store.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/notes/class-wc-tests-notes-data-store.php @@ -347,7 +347,7 @@ class WC_Admin_Tests_Notes_Data_Store extends WC_Unit_Test_Case { /** * Delete notes created by this class's tests. */ - public function tearDown() { + public function tearDown(): void { global $wpdb; parent::tearDown(); diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/plugins-helper.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/plugins-helper.php index 65acc9c91ae..605060a7c04 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/plugins-helper.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/plugins-helper.php @@ -17,7 +17,7 @@ class WC_Admin_Tests_Plugins_Helper extends WP_UnitTestCase { /** * Setup test data. Called before every test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports-orders-stats.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports-orders-stats.php index 1a4141071cf..6a75b128167 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports-orders-stats.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports-orders-stats.php @@ -18,14 +18,14 @@ class WC_Admin_Tests_Reports_Orders_Stats extends WC_Unit_Test_Case { /** * Don't cache report data during these tests. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { add_filter( 'woocommerce_analytics_report_should_use_cache', '__return_false' ); } /** * Restore cache for other tests. */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { remove_filter( 'woocommerce_analytics_report_should_use_cache', '__return_false' ); } diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports.php index 66706c15693..0dbfc4319b7 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/reports/class-wc-tests-reports.php @@ -20,7 +20,7 @@ class WC_Admin_Tests_Reports extends WC_Unit_Test_Case { /** * setUp */ - public function setUp() { + public function setUp(): void { parent::setUp(); require_once ABSPATH . 'wp-admin/includes/file.php'; diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/schedulers/class-wc-tests-mailchimp-scheduler.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/schedulers/class-wc-tests-mailchimp-scheduler.php index d41c7cf273a..270bf17428d 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/schedulers/class-wc-tests-mailchimp-scheduler.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/schedulers/class-wc-tests-mailchimp-scheduler.php @@ -26,7 +26,7 @@ class WC_Admin_Tests_Mailchimp_Scheduler extends WC_Unit_Test_Case { /** * Overridden setUp() method. */ - public function setUp() { + public function setUp(): void { $this->logger_mock = $this->getMockBuilder( \WC_Logger_Interface::class )->getMock(); $this->instance = $this->getMockBuilder( MailchimpScheduler::class ) diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/wc-admin-assets.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/wc-admin-assets.php index 4586af7320a..5b60e959952 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/wc-admin-assets.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/wc-admin-assets.php @@ -16,14 +16,14 @@ class WC_Admin_Tests_WCAdminAssets extends WP_UnitTestCase { /** * Setup */ - public function setUp() { + public function setUp(): void { add_filter( 'woocommerce_admin_features', array( $this, 'turn_on_unminified_js_feature' ), 20, 1 ); } /** * Tear Down */ - public function tearDown() { + public function tearDown(): void { remove_filter( 'woocommerce_admin_features', array( $this, 'turn_on_unminified_js_feature' ), 20 ); } diff --git a/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php b/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php index 37ec96d3abb..5a271fda33e 100644 --- a/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php +++ b/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php @@ -15,7 +15,7 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case { /** * Set up */ - public function setUp() { + public function setUp(): void { // Set default country to non-US so that 'payments' task gets added but 'woocommerce-payments' doesn't, // by default it won't be considered completed but we can manually change that as needed. update_option( 'woocommerce_default_country', 'JP' ); @@ -36,7 +36,7 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case { /** * Tear down */ - public function tearDown() { + public function tearDown(): void { remove_all_filters( 'woocommerce_available_payment_gateways' ); parent::tearDown(); @@ -98,7 +98,7 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case { $this->assertFalse( $widget->should_display_widget() ); } - + /** * Tests widget does not display when task list is hidden. */ diff --git a/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-functions-test.php b/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-functions-test.php index 8b0ae6934da..eb194b0cc39 100644 --- a/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-functions-test.php +++ b/plugins/woocommerce/tests/php/includes/admin/class-wc-admin-functions-test.php @@ -13,7 +13,7 @@ class WC_Admin_Functions_Test extends \WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = \WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/php/includes/admin/helper/class-wc-helper-api.php b/plugins/woocommerce/tests/php/includes/admin/helper/class-wc-helper-api.php index 3b30727df22..81904fa4b7f 100644 --- a/plugins/woocommerce/tests/php/includes/admin/helper/class-wc-helper-api.php +++ b/plugins/woocommerce/tests/php/includes/admin/helper/class-wc-helper-api.php @@ -8,7 +8,7 @@ class WC_Tests_Helper_API extends WC_Unit_Test_Case { /** * Set up mock responses for all API calls. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Callback used by WP_HTTP_TestCase to decide whether to perform HTTP requests or to provide a mocked response. diff --git a/plugins/woocommerce/tests/php/includes/admin/importers/class-wc-product-csv-importer-controller-test.php b/plugins/woocommerce/tests/php/includes/admin/importers/class-wc-product-csv-importer-controller-test.php index e59ef1b1196..b609776d322 100644 --- a/plugins/woocommerce/tests/php/includes/admin/importers/class-wc-product-csv-importer-controller-test.php +++ b/plugins/woocommerce/tests/php/includes/admin/importers/class-wc-product-csv-importer-controller-test.php @@ -10,7 +10,7 @@ class WC_Product_CSV_Importer_Controller_Test extends WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/php/includes/class-wc-cart-test.php b/plugins/woocommerce/tests/php/includes/class-wc-cart-test.php index caf79b5b3b4..84ea12c767b 100644 --- a/plugins/woocommerce/tests/php/includes/class-wc-cart-test.php +++ b/plugins/woocommerce/tests/php/includes/class-wc-cart-test.php @@ -13,7 +13,7 @@ class WC_Cart_Test extends \WC_Unit_Test_Case { /** * tearDown. */ - public function tearDown() { + public function tearDown(): void { parent::tearDown(); WC()->cart->empty_cart(); diff --git a/plugins/woocommerce/tests/php/includes/class-wc-checkout-test.php b/plugins/woocommerce/tests/php/includes/class-wc-checkout-test.php index 5b50a877d83..d05a5b99aa1 100644 --- a/plugins/woocommerce/tests/php/includes/class-wc-checkout-test.php +++ b/plugins/woocommerce/tests/php/includes/class-wc-checkout-test.php @@ -20,7 +20,7 @@ class WC_Checkout_Test extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { // phpcs:disable Generic.CodeAnalysis, Squiz.Commenting $this->sut = new class() extends WC_Checkout { public function validate_posted_data( &$data, &$errors ) { diff --git a/plugins/woocommerce/tests/php/includes/exporter/class-wc-product-csv-exporter-test.php b/plugins/woocommerce/tests/php/includes/exporter/class-wc-product-csv-exporter-test.php index c2ac4469260..c873cd9cdb2 100644 --- a/plugins/woocommerce/tests/php/includes/exporter/class-wc-product-csv-exporter-test.php +++ b/plugins/woocommerce/tests/php/includes/exporter/class-wc-product-csv-exporter-test.php @@ -20,7 +20,7 @@ class WC_Product_CSV_Exporter_Test extends \WC_Unit_Test_Case { /** * Load up the exporter classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = \WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php b/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php index 3fb1c7a919f..e88359a7bac 100644 --- a/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php +++ b/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php @@ -44,7 +44,7 @@ class WC_Gateway_Paypal_Test extends \WC_Unit_Test_Case { $order_notes = wc_get_order_notes( array( 'order_id' => $order->get_id() ) ); $latest_note = current( $order_notes ); - $this->assertContains( $this->error_message_26960, $latest_note->content ); + $this->assertStringContainsString( $this->error_message_26960, $latest_note->content ); } /** @@ -74,7 +74,7 @@ class WC_Gateway_Paypal_Test extends \WC_Unit_Test_Case { remove_filter( 'pre_http_request', array( $this, '__return_paypal_error' ) ); $this->assertWPError( $response ); - $this->assertContains( $this->error_message_26960, $response->get_error_message() ); + $this->assertStringContainsString( $this->error_message_26960, $response->get_error_message() ); } /** diff --git a/plugins/woocommerce/tests/php/includes/importer/class-wc-product-csv-importer-test.php b/plugins/woocommerce/tests/php/includes/importer/class-wc-product-csv-importer-test.php index d2fbc9d07b3..5a5c8109f34 100644 --- a/plugins/woocommerce/tests/php/includes/importer/class-wc-product-csv-importer-test.php +++ b/plugins/woocommerce/tests/php/includes/importer/class-wc-product-csv-importer-test.php @@ -13,7 +13,7 @@ class WC_Product_CSV_Importer_Test extends \WC_Unit_Test_Case { /** * Load up the importer classes since they aren't loaded by default. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $bootstrap = \WC_Unit_Tests_Bootstrap::instance(); diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller-tests.php index 1d9d178787c..9007ef44bce 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Product_Attributes_V1_Controller_Tests extends WC_Unit_Test_Case { /** * Runs before any test. */ - public function setUp() { + public function setUp(): void { // phpcs:disable Generic.CodeAnalysis, Squiz.Commenting $this->sut = new class() extends WC_REST_Product_Attributes_V1_Controller { public function get_taxonomy( $request ) { diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller-tests.php index 426f6c3956a..e0dfb3f4bd9 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller-tests.php @@ -40,7 +40,7 @@ class WC_REST_Product_Reviews_V1_Controller_Tests extends WC_Unit_Test_Case { /** * Creates test users with varying permissions. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sut = new WC_REST_Product_Reviews_V1_Controller(); diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller-test.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller-test.php index f9379289e68..d14d88a5f4e 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller-test.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller-test.php @@ -9,7 +9,7 @@ class WC_REST_Order_V2_Controller_Test extends WC_REST_Unit_Test_case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Orders_V2_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller-tests.php index 9483a2459a3..592fadf31b3 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller-tests.php @@ -19,7 +19,7 @@ class WC_REST_Product_Reviews_V2_Controller_Test extends WC_REST_Unit_Test_case */ private $editor_id; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sut = new WC_REST_Product_Reviews_V2_Controller(); diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-products-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-products-controller-tests.php index 31460f3cc92..ff374aa8b70 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-products-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-products-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Products_V2_Controller_Test extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Products_V2_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-coupons-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-coupons-controller-tests.php index 61e8829e989..e466cecee2c 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-coupons-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-coupons-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Coupons_Controller_Tests extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Coupons_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller-tests.php index 2006981dab5..7315bf16247 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Orders_Controller_Tests extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Orders_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller-tests.php index 1303d68c9e9..8d0efb8dcb3 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller-tests.php @@ -33,7 +33,7 @@ class WC_REST_Product_Reviews_Controller_Tests extends WC_REST_Unit_Test_Case { */ private $review_id; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sut = new WC_REST_Product_Reviews_Controller(); diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller-tests.php index 55ac6fc68a0..6f220b9ff7b 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Products_Controller_Tests extends WC_REST_Unit_Test_Case { /** * Setup our test server, endpoints, and user info. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->endpoint = new WC_REST_Products_Controller(); $this->user = $this->factory->user->create( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-taxes-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-taxes-controller-tests.php index e991716cc93..8b9137e8e8c 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-taxes-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-taxes-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Taxes_Controller_Tests extends WC_REST_Unit_Test_Case { /** * Runs before any test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->factory->user->create( array( diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller-tests.php index e7556b02f7d..e9e86eed468 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller-tests.php @@ -9,7 +9,7 @@ class WC_REST_Terms_Controller_Tests extends WC_Unit_Test_Case { /** * Runs before any test. */ - public function setUp() { + public function setUp(): void { // phpcs:disable Generic.CodeAnalysis, Squiz.Commenting $this->sut = new class() extends WC_REST_Terms_Controller { public function get_taxonomy( $request ) { diff --git a/plugins/woocommerce/tests/php/includes/wc-attribute-functions-test.php b/plugins/woocommerce/tests/php/includes/wc-attribute-functions-test.php index d324ae59581..6eb80155a4a 100644 --- a/plugins/woocommerce/tests/php/includes/wc-attribute-functions-test.php +++ b/plugins/woocommerce/tests/php/includes/wc-attribute-functions-test.php @@ -22,7 +22,7 @@ class WC_Attribute_Functions_Test extends \WC_Unit_Test_Case { /** * Set up. */ - public function setUp() { + public function setUp(): void { parent::setUp(); // Tests will use this to verify the correct call count. @@ -42,7 +42,7 @@ class WC_Attribute_Functions_Test extends \WC_Unit_Test_Case { /** * Tear down. */ - public function tearDown() { + public function tearDown(): void { remove_all_filters( 'woocommerce_attribute_taxonomies' ); remove_all_filters( 'sanitize_taxonomy_name' ); diff --git a/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/AbstractServiceProviderTest.php b/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/AbstractServiceProviderTest.php index beaa70dcef8..c3b82091515 100644 --- a/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/AbstractServiceProviderTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/AbstractServiceProviderTest.php @@ -39,7 +39,7 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $this->container = new ExtendedContainer(); $this->sut = new class() extends AbstractServiceProvider { @@ -67,7 +67,7 @@ class AbstractServiceProviderTest extends \WC_Unit_Test_Case { /** * Runs before all the tests of the class. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { /** * Return a new instance of ClassWithDependencies. * diff --git a/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/ExtendedContainerTest.php b/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/ExtendedContainerTest.php index 679c45913e9..2fb4f391931 100644 --- a/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/ExtendedContainerTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/DependencyManagement/ExtendedContainerTest.php @@ -25,7 +25,7 @@ class ExtendedContainerTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $this->sut = new ExtendedContainer(); } diff --git a/plugins/woocommerce/tests/php/src/Internal/DownloadPermissionsAdjusterTest.php b/plugins/woocommerce/tests/php/src/Internal/DownloadPermissionsAdjusterTest.php index 3df747de564..7f31dd09a3a 100644 --- a/plugins/woocommerce/tests/php/src/Internal/DownloadPermissionsAdjusterTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/DownloadPermissionsAdjusterTest.php @@ -24,7 +24,7 @@ class DownloadPermissionsAdjusterTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $this->sut = new DownloadPermissionsAdjuster(); $this->sut->init(); diff --git a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/DataRegeneratorTest.php b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/DataRegeneratorTest.php index 57fe756ec88..68cfd081af6 100644 --- a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/DataRegeneratorTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/DataRegeneratorTest.php @@ -40,7 +40,7 @@ class DataRegeneratorTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { global $wpdb; parent::setUp(); diff --git a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/FiltererTest.php b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/FiltererTest.php index 655b0afe4bd..0a9851392fc 100644 --- a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/FiltererTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/FiltererTest.php @@ -14,7 +14,7 @@ class FiltererTest extends \WC_Unit_Test_Case { /** * Runs before all the tests in the class. */ - public static function setupBeforeClass() { + public static function setUpBeforeClass(): void { global $wpdb, $wp_post_types; parent::setUpBeforeClass(); @@ -41,7 +41,7 @@ class FiltererTest extends \WC_Unit_Test_Case { /** * Runs after each test. */ - public function tearDown() { + public function tearDown(): void { global $wpdb; parent::tearDown(); diff --git a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/LookupDataStoreTest.php b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/LookupDataStoreTest.php index 3b124f31645..81d15c11eef 100644 --- a/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/LookupDataStoreTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/ProductAttributesLookup/LookupDataStoreTest.php @@ -33,14 +33,14 @@ class LookupDataStoreTest extends \WC_Unit_Test_Case { /** * Runs after all the tests in the class. */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { parent::tearDownAfterClass(); } /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { global $wpdb; $this->lookup_table_name = $wpdb->prefix . 'wc_product_attributes_lookup'; diff --git a/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/RegisterTest.php b/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/RegisterTest.php index f5780121a2c..de027258f2c 100644 --- a/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/RegisterTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/RegisterTest.php @@ -19,7 +19,7 @@ class RegisterTest extends WC_Unit_Test_Case { * Create a Whitelist with representative paths including a URL with a port number, * a regular URL and an absolute filepath. */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$sut = new Register(); diff --git a/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/SynchronizeTest.php b/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/SynchronizeTest.php index 047940654c9..5ffb93d3ddd 100644 --- a/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/SynchronizeTest.php +++ b/plugins/woocommerce/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/SynchronizeTest.php @@ -22,7 +22,7 @@ class SynchronizeTest extends WC_Unit_Test_Case { /** * Create subject under test. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sut = wc_get_container()->get( Synchronize::class ); } diff --git a/plugins/woocommerce/tests/php/src/Proxies/ClassThatDependsOnLegacyCodeTest.php b/plugins/woocommerce/tests/php/src/Proxies/ClassThatDependsOnLegacyCodeTest.php index 2f1985c095d..71dc225cab3 100644 --- a/plugins/woocommerce/tests/php/src/Proxies/ClassThatDependsOnLegacyCodeTest.php +++ b/plugins/woocommerce/tests/php/src/Proxies/ClassThatDependsOnLegacyCodeTest.php @@ -23,7 +23,7 @@ class ClassThatDependsOnLegacyCodeTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $container = wc_get_container(); $container->add( ClassThatDependsOnLegacyCode::class )->addArgument( LegacyProxy::class ); $this->sut = $container->get( ClassThatDependsOnLegacyCode::class ); diff --git a/plugins/woocommerce/tests/php/src/Proxies/LegacyProxyTest.php b/plugins/woocommerce/tests/php/src/Proxies/LegacyProxyTest.php index 9d616368665..240c0c4de02 100644 --- a/plugins/woocommerce/tests/php/src/Proxies/LegacyProxyTest.php +++ b/plugins/woocommerce/tests/php/src/Proxies/LegacyProxyTest.php @@ -23,7 +23,7 @@ class LegacyProxyTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $this->sut = new LegacyProxy(); } diff --git a/plugins/woocommerce/tests/php/src/Proxies/MockableLegacyProxyTest.php b/plugins/woocommerce/tests/php/src/Proxies/MockableLegacyProxyTest.php index 579f514a7bc..e69d24582c2 100644 --- a/plugins/woocommerce/tests/php/src/Proxies/MockableLegacyProxyTest.php +++ b/plugins/woocommerce/tests/php/src/Proxies/MockableLegacyProxyTest.php @@ -23,7 +23,7 @@ class MockableLegacyProxyTest extends \WC_Unit_Test_Case { /** * Runs before each test. */ - public function setUp() { + public function setUp(): void { $this->sut = new MockableLegacyProxy(); } diff --git a/plugins/woocommerce/woocommerce.php b/plugins/woocommerce/woocommerce.php index 78cb6934cc8..62470bec195 100644 --- a/plugins/woocommerce/woocommerce.php +++ b/plugins/woocommerce/woocommerce.php @@ -9,7 +9,7 @@ * Text Domain: woocommerce * Domain Path: /i18n/languages/ * Requires at least: 5.7 - * Requires PHP: 7.0 + * Requires PHP: 7.2 * * @package WooCommerce */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c63a00785a9..39401378126 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,7 @@ importers: '@woocommerce/eslint-plugin': workspace:* '@wordpress/babel-plugin-import-jsx-pragma': ^3.1.0 '@wordpress/babel-preset-default': ^6.4.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/prettier-config': ^1.1.1 chalk: ^4.1.2 glob: ^7.2.0 @@ -43,6 +44,7 @@ importers: '@nrwl/workspace': 13.3.5_42cab1dece2b2240094de84cfd414406 '@types/node': 14.14.33 '@woocommerce/eslint-plugin': link:packages/js/eslint-plugin + '@wordpress/eslint-plugin': 11.0.1_e97ea7521b9baec0e8686a2ccc3f1625 '@wordpress/prettier-config': 1.1.1 chalk: 4.1.2 glob: 7.2.0 @@ -62,7 +64,9 @@ importers: '@types/puppeteer': ^5.4.5 '@typescript-eslint/eslint-plugin': ^5.14.0 '@woocommerce/api': ^0.2.0 + '@wordpress/eslint-plugin': ^11.0.0 config: ^3.3.7 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 jest-mock-extended: ^1.0.18 @@ -77,8 +81,10 @@ importers: '@babel/core': 7.17.8 '@types/expect-puppeteer': 4.4.7 '@types/puppeteer': 5.4.5 - '@typescript-eslint/eslint-plugin': 5.15.0_typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 5.15.0_eslint@8.12.0+typescript@4.6.2 '@woocommerce/api': link:../api + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 jest-mock-extended: 1.0.18_jest@27.5.1+typescript@4.6.2 @@ -135,6 +141,7 @@ importers: specifiers: '@automattic/interpolate-components': ^1.2.0 '@babel/core': ^7.17.5 + '@babel/runtime': ^7.17.2 '@storybook/addon-actions': ^6.4.0 '@storybook/addon-console': ^1.2.3 '@storybook/addon-controls': ^6.4.19 @@ -165,6 +172,7 @@ importers: '@wordpress/deprecated': ^3.3.1 '@wordpress/dom': ^3.3.2 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/hooks': ^2.12.3 '@wordpress/html-entities': ^3.3.1 '@wordpress/i18n': ^4.3.1 @@ -186,6 +194,7 @@ importers: d3-time-format: ^2.3.0 dompurify: ^2.3.6 emoji-flags: ^1.3.0 + eslint: ^8.12.0 gridicons: ^3.4.0 jest: ^27.5.1 jest-cli: ^27.5.1 @@ -245,17 +254,18 @@ importers: react-transition-group: 4.4.2 devDependencies: '@babel/core': 7.17.8 + '@babel/runtime': 7.17.7 '@storybook/addon-actions': 6.4.19 '@storybook/addon-console': 1.2.3_@storybook+addon-actions@6.4.19 - '@storybook/addon-controls': 6.4.19_28bcd63db444ce2c431359704a8c8a5d - '@storybook/addon-docs': 6.4.19_fda340e44fb1f07a107df138b22bded6 + '@storybook/addon-controls': 6.4.19_ad5fc232a476648e022b673b2e1293fc + '@storybook/addon-docs': 6.4.19_c07d33072055753b44e1c9d473b78732 '@storybook/addon-knobs': 6.4.0_bdb88cf577f190583d60d23c102288af '@storybook/addon-links': 6.4.19 '@storybook/addons': 6.4.19 '@storybook/api': 6.4.19 '@storybook/components': 6.4.19 '@storybook/core-events': 6.4.19 - '@storybook/react': 6.4.19_039d894b52fc2688d0a1b62632e1b68d + '@storybook/react': 6.4.19_df9bce9a6d10cedcb22cc302b49e05b8 '@storybook/theming': 6.4.19 '@testing-library/dom': 8.11.3 '@testing-library/jest-dom': 5.16.2 @@ -263,9 +273,11 @@ importers: '@testing-library/user-event': 13.5.0_@testing-library+dom@8.11.3 '@woocommerce/style-build': link:../style-build '@wordpress/browserslist-config': 4.1.2 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 '@wordpress/scripts': 12.6.1_6cad74fe17bf42b947bda894b27e9dc2 concurrently: 7.0.0 css-loader: 3.6.0_webpack@5.70.0 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 postcss-loader: 3.0.0 @@ -279,7 +291,9 @@ importers: packages/js/csv-export: specifiers: '@babel/core': ^7.17.5 + '@wordpress/eslint-plugin': ^11.0.0 browser-filesaver: ^1.1.1 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 moment: ^2.29.1 @@ -291,6 +305,8 @@ importers: moment: 2.29.1 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -303,8 +319,10 @@ importers: '@woocommerce/number': workspace:* '@wordpress/deprecated': ^2.12.3 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/html-entities': ^3.3.1 '@wordpress/i18n': ^3.20.0 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 rimraf: ^3.0.2 @@ -318,6 +336,8 @@ importers: '@wordpress/i18n': 3.20.0 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -337,11 +357,13 @@ importers: '@wordpress/compose': ^5.1.2 '@wordpress/data': ^6.3.0 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/i18n': ^4.3.1 '@wordpress/notices': ^3.3.2 classnames: ^2.3.1 concurrently: ^7.0.0 css-loader: ^3.6.0 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 postcss-loader: ^3.0.0 @@ -371,8 +393,10 @@ importers: '@types/wordpress__components': 9.8.6 '@woocommerce/style-build': link:../style-build '@wordpress/browserslist-config': 4.1.2 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 concurrently: 7.0.0 css-loader: 3.6.0_webpack@5.70.0 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 postcss-loader: 3.0.0 @@ -386,6 +410,7 @@ importers: packages/js/data: specifiers: '@babel/core': ^7.17.5 + '@babel/runtime': ^7.17.2 '@testing-library/react': ^12.1.3 '@testing-library/react-hooks': ^7.0.2 '@types/wordpress__data-controls': ^2.2.0 @@ -398,10 +423,12 @@ importers: '@wordpress/data-controls': ^2.3.2 '@wordpress/deprecated': ^3.3.1 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/hooks': ^2.12.3 '@wordpress/i18n': ^4.3.1 '@wordpress/url': ^3.4.1 dompurify: ^2.3.6 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 md5: ^2.3.0 @@ -429,9 +456,12 @@ importers: rememo: 4.0.0 devDependencies: '@babel/core': 7.17.8 + '@babel/runtime': 7.17.7 '@testing-library/react': 12.1.4 '@testing-library/react-hooks': 7.0.2 '@types/wordpress__data-controls': 2.2.0 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -442,8 +472,10 @@ importers: specifiers: '@babel/core': ^7.17.5 '@wordpress/date': ^4.3.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/i18n': ^4.3.1 d3-time-format: ^2.3.0 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 moment: ^2.29.1 @@ -458,7 +490,9 @@ importers: qs: 6.10.3 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 d3-time-format: 2.3.0 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -469,6 +503,8 @@ importers: specifiers: '@babel/core': ^7.17.5 '@wordpress/dependency-extraction-webpack-plugin': ^3.3.0 + '@wordpress/eslint-plugin': ^11.0.0 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 rimraf: ^3.0.2 @@ -480,6 +516,8 @@ importers: '@wordpress/dependency-extraction-webpack-plugin': 3.4.1_webpack@5.70.0 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -640,7 +678,7 @@ importers: '@babel/core': ^7.17.5 '@typescript-eslint/parser': ^5.14.0 '@wordpress/eslint-plugin': ^11.0.0 - eslint: ^8.10.0 + eslint: ^8.11.0 eslint-plugin-react-hooks: ^4.3.0 eslint-plugin-testing-library: ^5.1.0 jest: ^27.5.1 @@ -650,14 +688,14 @@ importers: ts-jest: ^27.1.3 typescript: ^4.6.2 dependencies: - '@typescript-eslint/parser': 5.15.0_eslint@8.11.0+typescript@4.6.2 - '@wordpress/eslint-plugin': 11.0.1_2205da2c9bef219d53091cb9dbc5524c - eslint: 8.11.0 - eslint-plugin-react-hooks: 4.3.0_eslint@8.11.0 - eslint-plugin-testing-library: 5.1.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/parser': 5.15.0_eslint@8.12.0+typescript@4.6.2 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint-plugin-react-hooks: 4.3.0_eslint@8.12.0 + eslint-plugin-testing-library: 5.1.0_eslint@8.12.0+typescript@4.6.2 requireindex: 1.2.0 devDependencies: '@babel/core': 7.17.8 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -681,6 +719,7 @@ importers: '@wordpress/browserslist-config': ^4.1.1 '@wordpress/components': ^19.5.0 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/i18n': ^4.3.1 '@wordpress/icons': ^6.3.0 '@wordpress/keycodes': ^3.3.1 @@ -688,6 +727,7 @@ importers: concurrently: ^7.0.0 css-loader: ^3.6.0 dompurify: ^2.3.6 + eslint: ^8.12.0 gridicons: ^3.4.0 jest: ^27.5.1 jest-cli: ^27.5.1 @@ -719,7 +759,7 @@ importers: '@babel/runtime': 7.17.7 '@storybook/addon-actions': 6.4.19 '@storybook/addon-console': 1.2.3_@storybook+addon-actions@6.4.19 - '@storybook/react': 6.4.19_039d894b52fc2688d0a1b62632e1b68d + '@storybook/react': 6.4.19_df9bce9a6d10cedcb22cc302b49e05b8 '@testing-library/dom': 8.11.3 '@testing-library/react': 12.1.4 '@testing-library/user-event': 13.5.0_@testing-library+dom@8.11.3 @@ -727,8 +767,10 @@ importers: '@types/react-transition-group': 4.4.4 '@woocommerce/style-build': link:../style-build '@wordpress/browserslist-config': 4.1.2 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 concurrently: 7.0.0 css-loader: 3.6.0_webpack@5.70.0 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 postcss-loader: 3.0.0 @@ -748,8 +790,10 @@ importers: '@types/node': ^17.0.21 '@types/qs': ^6.9.7 '@wordpress/api-fetch': ^6.0.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/hooks': ^2.12.3 cookie: ^0.4.2 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 qs: ^6.10.3 @@ -768,6 +812,8 @@ importers: '@types/cookie': 0.4.1 '@types/node': 17.0.21 '@types/qs': 6.9.7 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -780,8 +826,10 @@ importers: '@testing-library/jest-dom': ^5.16.2 '@testing-library/react': ^12.1.3 '@wordpress/data': ^6.3.0 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/i18n': ^4.3.1 '@wordpress/jest-console': ^5.0.1 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 regenerator-runtime: ^0.13.9 @@ -797,6 +845,8 @@ importers: regenerator-runtime: 0.13.9 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -806,13 +856,16 @@ importers: packages/js/navigation: specifiers: '@babel/core': ^7.17.5 + '@babel/runtime': ^7.17.2 '@wordpress/api-fetch': ^6.0.1 '@wordpress/components': ^19.5.0 '@wordpress/compose': ^5.1.2 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/hooks': ^2.12.3 '@wordpress/notices': ^3.3.2 '@wordpress/url': ^3.4.1 + eslint: ^8.12.0 history: ^4.10.1 jest: ^27.5.1 jest-cli: ^27.5.1 @@ -832,6 +885,9 @@ importers: qs: 6.10.3 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 + '@babel/runtime': 7.17.7 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -843,7 +899,9 @@ importers: '@babel/core': ^7.17.5 '@wordpress/a11y': ^2.15.3 '@wordpress/data': ^6.3.0 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/notices': ^3.3.2 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 rimraf: ^3.0.2 @@ -855,6 +913,8 @@ importers: '@wordpress/notices': 3.4.1 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -864,6 +924,9 @@ importers: packages/js/number: specifiers: '@babel/core': ^7.17.5 + '@wordpress/eslint-plugin': ^11.0.0 + eslint: ^8.12.0 + '@babel/runtime': ^7.17.2 jest: ^27.5.1 jest-cli: ^27.5.1 locutus: ^2.0.16 @@ -874,6 +937,9 @@ importers: locutus: 2.0.16 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 + '@babel/runtime': 7.17.7 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -891,9 +957,11 @@ importers: '@wordpress/browserslist-config': ^4.1.1 '@wordpress/components': ^19.5.0 '@wordpress/element': ^4.1.1 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/i18n': ^4.3.1 concurrently: ^7.0.0 css-loader: ^3.6.0 + eslint: ^8.12.0 gridicons: ^3.4.0 jest: ^27.5.1 jest-cli: ^27.5.1 @@ -918,7 +986,9 @@ importers: '@babel/core': 7.17.8 '@woocommerce/style-build': link:../style-build '@wordpress/browserslist-config': 4.1.2 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 css-loader: 3.6.0_webpack@5.70.0 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 postcss-loader: 3.0.0 @@ -934,8 +1004,10 @@ importers: '@automattic/color-studio': ^2.5.0 '@babel/core': ^7.17.5 '@wordpress/base-styles': ^3.6.0 + '@wordpress/eslint-plugin': ^11.0.0 '@wordpress/postcss-plugins-preset': ^1.6.0 css-loader: ^3.6.0 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 mini-css-extract-plugin: ^2.6.0 @@ -959,6 +1031,8 @@ importers: webpack-rtl-plugin: 2.0.0 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -969,7 +1043,9 @@ importers: packages/js/tracks: specifiers: '@babel/core': ^7.17.5 + '@wordpress/eslint-plugin': ^11.0.0 debug: ^4.3.3 + eslint: ^8.12.0 jest: ^27.5.1 jest-cli: ^27.5.1 rimraf: ^3.0.2 @@ -979,6 +1055,8 @@ importers: debug: 4.3.3 devDependencies: '@babel/core': 7.17.8 + '@wordpress/eslint-plugin': 11.0.1_7c040a9b494a33cf8bf9079642892fb1 + eslint: 8.12.0 jest: 27.5.1 jest-cli: 27.5.1 rimraf: 3.0.2 @@ -1198,6 +1276,7 @@ importers: eslint-import-resolver-webpack: ^0.13.2 eslint-plugin-import: ^2.25.4 eslint-plugin-react: ^7.29.2 + expose-loader: ^3.1.0 fork-ts-checker-webpack-plugin: ^6.5.0 fs-extra: ^8.1.0 github-label-sync: ^2.0.2 @@ -1401,6 +1480,7 @@ importers: eslint-import-resolver-webpack: 0.13.2_bac363bc2c2f46a65300020741b6cf5e eslint-plugin-import: 2.25.4_eslint@8.11.0 eslint-plugin-react: 7.29.4_eslint@8.11.0 + expose-loader: 3.1.0_webpack@5.70.0 fork-ts-checker-webpack-plugin: 6.5.0_10568ae13669cc833891d65cd6879aa0 fs-extra: 8.1.0 grunt: 1.4.1 @@ -1739,6 +1819,19 @@ packages: transitivePeerDependencies: - supports-color + /@babel/eslint-parser/7.17.0_@babel+core@7.12.9: + resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} + engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} + peerDependencies: + '@babel/core': '>=7.11.0' + eslint: ^7.5.0 || ^8.0.0 + dependencies: + '@babel/core': 7.12.9 + eslint-scope: 5.1.1 + eslint-visitor-keys: 2.1.0 + semver: 6.3.0 + dev: true + /@babel/eslint-parser/7.17.0_@babel+core@7.17.8+eslint@8.11.0: resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -1751,6 +1844,20 @@ packages: eslint-scope: 5.1.1 eslint-visitor-keys: 2.1.0 semver: 6.3.0 + dev: true + + /@babel/eslint-parser/7.17.0_@babel+core@7.17.8+eslint@8.12.0: + resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} + engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} + peerDependencies: + '@babel/core': '>=7.11.0' + eslint: ^7.5.0 || ^8.0.0 + dependencies: + '@babel/core': 7.17.8 + eslint: 8.12.0 + eslint-scope: 5.1.1 + eslint-visitor-keys: 2.1.0 + semver: 6.3.0 /@babel/generator/7.16.0: resolution: {integrity: sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==} @@ -2391,9 +2498,9 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.16.0 - '@babel/template': 7.16.0 - '@babel/traverse': 7.16.3 - '@babel/types': 7.16.0 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 transitivePeerDependencies: - supports-color @@ -6590,6 +6697,7 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color + dev: true /@financial-times/origami-service-makefile/7.0.3: resolution: {integrity: sha512-aKe65sZ3XgZ/0Sm0MDLbGrcO3G4DRv/bVW4Gpmw68cRZV9IBE7h/pwfR3Rs7njNSZMFkjS4rPG/YySv9brQByA==} @@ -6657,9 +6765,11 @@ packages: minimatch: 3.1.2 transitivePeerDependencies: - supports-color + dev: true /@humanwhocodes/object-schema/1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + dev: true /@isaacs/string-locale-compare/1.1.0: resolution: {integrity: sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==} @@ -8925,7 +9035,7 @@ packages: - webpack-command dev: true - /@storybook/addon-controls/6.4.19_28bcd63db444ce2c431359704a8c8a5d: + /@storybook/addon-controls/6.4.19_ad5fc232a476648e022b673b2e1293fc: resolution: {integrity: sha512-JHi5z9i6NsgQLfG5WOeQE1AyOrM+QJLrjT+uOYx40bq+OC1yWHH7qHiphPP8kjJJhCZlaQk1qqXYkkQXgaeHSw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -8940,7 +9050,7 @@ packages: '@storybook/api': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/components': 6.4.19 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/node-logger': 6.4.19 '@storybook/store': 6.4.19 @@ -9070,7 +9180,7 @@ packages: - webpack-command dev: true - /@storybook/addon-docs/6.4.19_fda340e44fb1f07a107df138b22bded6: + /@storybook/addon-docs/6.4.19_c07d33072055753b44e1c9d473b78732: resolution: {integrity: sha512-OEPyx/5ZXmZOPqIAWoPjlIP8Q/YfNjAmBosA8tmA8t5KCSiq/vpLcAvQhxqK6n0wk/B8Xp67Z8RpLfXjU8R3tw==} peerDependencies: '@storybook/angular': 6.4.19 @@ -9128,17 +9238,17 @@ packages: '@mdx-js/react': 1.6.22 '@storybook/addons': 6.4.19 '@storybook/api': 6.4.19 - '@storybook/builder-webpack4': 6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7 + '@storybook/builder-webpack4': 6.4.19_3c9642e85c55378a78283e2c58ad860d '@storybook/client-logger': 6.4.19 '@storybook/components': 6.4.19 - '@storybook/core': 6.4.19_86931dae2f2647fd4afd5c9e36b05865 + '@storybook/core': 6.4.19_4a2c49d703ffc87352c156b0c4186be7 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/csf-tools': 6.4.19 '@storybook/node-logger': 6.4.19 '@storybook/postinstall': 6.4.19 '@storybook/preview-web': 6.4.19 - '@storybook/react': 6.4.19_039d894b52fc2688d0a1b62632e1b68d + '@storybook/react': 6.4.19_df9bce9a6d10cedcb22cc302b49e05b8 '@storybook/source-loader': 6.4.19 '@storybook/store': 6.4.19 '@storybook/theming': 6.4.19 @@ -9547,7 +9657,7 @@ packages: - webpack-command dev: true - /@storybook/builder-webpack4/6.4.19_28bcd63db444ce2c431359704a8c8a5d: + /@storybook/builder-webpack4/6.4.19_3c9642e85c55378a78283e2c58ad860d: resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -9585,7 +9695,7 @@ packages: '@storybook/client-api': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/components': 6.4.19 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/core-events': 6.4.19 '@storybook/node-logger': 6.4.19 '@storybook/preview-web': 6.4.19 @@ -9617,7 +9727,7 @@ packages: raw-loader: 4.0.2_webpack@4.46.0 stable: 0.1.8 style-loader: 1.3.0_webpack@4.46.0 - terser-webpack-plugin: 4.2.3_webpack@4.46.0 + terser-webpack-plugin: 4.2.3_acorn@7.4.1+webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 @@ -9729,7 +9839,7 @@ packages: - webpack-command dev: true - /@storybook/builder-webpack4/6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7: + /@storybook/builder-webpack4/6.4.19_ad5fc232a476648e022b673b2e1293fc: resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -9767,7 +9877,7 @@ packages: '@storybook/client-api': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/components': 6.4.19 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/core-events': 6.4.19 '@storybook/node-logger': 6.4.19 '@storybook/preview-web': 6.4.19 @@ -9799,7 +9909,7 @@ packages: raw-loader: 4.0.2_webpack@4.46.0 stable: 0.1.8 style-loader: 1.3.0_webpack@4.46.0 - terser-webpack-plugin: 4.2.3_acorn@7.4.1+webpack@4.46.0 + terser-webpack-plugin: 4.2.3_webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 @@ -10289,7 +10399,7 @@ packages: - webpack-command dev: true - /@storybook/core-common/6.4.19_28bcd63db444ce2c431359704a8c8a5d: + /@storybook/core-common/6.4.19_ad5fc232a476648e022b673b2e1293fc: resolution: {integrity: sha512-X1pJJkO48DFxl6iyEemIKqRkJ7j9/cBh3BRBUr+xZHXBvnD0GKDXIocwh0PjSxSC6XSu3UCQnqtKi3PbjRl8Dg==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -10332,7 +10442,7 @@ packages: express: 4.17.1 file-system-cache: 1.0.5 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.0_typescript@4.6.2+webpack@4.46.0 + fork-ts-checker-webpack-plugin: 6.5.0_ec34b068c8cf37561abcf5fd5b20a134 fs-extra: 9.1.0 glob: 7.2.0 handlebars: 4.7.7 @@ -10363,7 +10473,7 @@ packages: core-js: 3.21.1 dev: true - /@storybook/core-server/6.4.19_28bcd63db444ce2c431359704a8c8a5d: + /@storybook/core-server/6.4.19_3c9642e85c55378a78283e2c58ad860d: resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==} peerDependencies: '@storybook/builder-webpack5': 6.4.19 @@ -10380,13 +10490,13 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-webpack4': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/builder-webpack4': 6.4.19_3c9642e85c55378a78283e2c58ad860d '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/csf-tools': 6.4.19 - '@storybook/manager-webpack4': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/manager-webpack4': 6.4.19_3c9642e85c55378a78283e2c58ad860d '@storybook/node-logger': 6.4.19 '@storybook/semver': 7.3.2 '@storybook/store': 6.4.19 @@ -10587,7 +10697,7 @@ packages: - webpack-command dev: true - /@storybook/core-server/6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7: + /@storybook/core-server/6.4.19_ad5fc232a476648e022b673b2e1293fc: resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==} peerDependencies: '@storybook/builder-webpack5': 6.4.19 @@ -10604,13 +10714,13 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-webpack4': 6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7 + '@storybook/builder-webpack4': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/csf-tools': 6.4.19 - '@storybook/manager-webpack4': 6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7 + '@storybook/manager-webpack4': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/node-logger': 6.4.19 '@storybook/semver': 7.3.2 '@storybook/store': 6.4.19 @@ -10659,7 +10769,39 @@ packages: - webpack-command dev: true - /@storybook/core/6.4.19_86931dae2f2647fd4afd5c9e36b05865: + /@storybook/core/6.4.19_0aa9eeaa726e2cf1920b2ebcd5c10136: + resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==} + peerDependencies: + '@storybook/builder-webpack5': 6.4.19 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + webpack: '*' + peerDependenciesMeta: + '@storybook/builder-webpack5': + optional: true + typescript: + optional: true + dependencies: + '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 + '@storybook/core-server': 6.4.19_ad5fc232a476648e022b673b2e1293fc + typescript: 4.6.2 + webpack: 4.46.0_webpack-cli@3.3.12 + transitivePeerDependencies: + - '@storybook/manager-webpack5' + - '@types/react' + - acorn + - bufferutil + - encoding + - eslint + - supports-color + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + + /@storybook/core/6.4.19_4a2c49d703ffc87352c156b0c4186be7: resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==} peerDependencies: '@storybook/builder-webpack5': 6.4.19 @@ -10674,7 +10816,7 @@ packages: optional: true dependencies: '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@5.70.0 - '@storybook/core-server': 6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7 + '@storybook/core-server': 6.4.19_3c9642e85c55378a78283e2c58ad860d typescript: 4.6.2 webpack: 5.70.0_webpack-cli@3.3.12 transitivePeerDependencies: @@ -10761,38 +10903,6 @@ packages: - webpack-command dev: true - /@storybook/core/6.4.19_9a8ff0004ea215335da87f71ceba5c57: - resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==} - peerDependencies: - '@storybook/builder-webpack5': 6.4.19 - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - typescript: '*' - webpack: '*' - peerDependenciesMeta: - '@storybook/builder-webpack5': - optional: true - typescript: - optional: true - dependencies: - '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 - '@storybook/core-server': 6.4.19_28bcd63db444ce2c431359704a8c8a5d - typescript: 4.6.2 - webpack: 4.46.0_webpack-cli@3.3.12 - transitivePeerDependencies: - - '@storybook/manager-webpack5' - - '@types/react' - - acorn - - bufferutil - - encoding - - eslint - - supports-color - - utf-8-validate - - vue-template-compiler - - webpack-cli - - webpack-command - dev: true - /@storybook/csf-tools/6.4.19: resolution: {integrity: sha512-gf/zRhGoAVsFwSyV2tc+jeJfZQkxF6QsaZgbUSe24/IUvGFCT/PS/jZq1qy7dECAwrTOfykgu8juyBtj6WhWyw==} dependencies: @@ -10883,7 +10993,7 @@ packages: - webpack-command dev: true - /@storybook/manager-webpack4/6.4.19_28bcd63db444ce2c431359704a8c8a5d: + /@storybook/manager-webpack4/6.4.19_3c9642e85c55378a78283e2c58ad860d: resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -10898,7 +11008,7 @@ packages: '@babel/preset-react': 7.16.7_@babel+core@7.17.8 '@storybook/addons': 6.4.19 '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/node-logger': 6.4.19 '@storybook/theming': 6.4.19 '@storybook/ui': 6.4.19 @@ -10922,7 +11032,7 @@ packages: resolve-from: 5.0.0 style-loader: 1.3.0_webpack@4.46.0 telejson: 5.3.3 - terser-webpack-plugin: 4.2.3_webpack@4.46.0 + terser-webpack-plugin: 4.2.3_acorn@7.4.1+webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 @@ -11001,7 +11111,7 @@ packages: - webpack-command dev: true - /@storybook/manager-webpack4/6.4.19_f9d0fa8f8cc1d6941265b56c224b53d7: + /@storybook/manager-webpack4/6.4.19_ad5fc232a476648e022b673b2e1293fc: resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -11016,7 +11126,7 @@ packages: '@babel/preset-react': 7.16.7_@babel+core@7.17.8 '@storybook/addons': 6.4.19 '@storybook/core-client': 6.4.19_typescript@4.6.2+webpack@4.46.0 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc '@storybook/node-logger': 6.4.19 '@storybook/theming': 6.4.19 '@storybook/ui': 6.4.19 @@ -11040,7 +11150,7 @@ packages: resolve-from: 5.0.0 style-loader: 1.3.0_webpack@4.46.0 telejson: 5.3.3 - terser-webpack-plugin: 4.2.3_acorn@7.4.1+webpack@4.46.0 + terser-webpack-plugin: 4.2.3_webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 @@ -11204,68 +11314,6 @@ packages: - supports-color dev: true - /@storybook/react/6.4.19_039d894b52fc2688d0a1b62632e1b68d: - resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - '@babel/core': ^7.11.5 - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - typescript: '*' - peerDependenciesMeta: - '@babel/core': - optional: true - typescript: - optional: true - dependencies: - '@babel/core': 7.17.8 - '@babel/preset-flow': 7.16.7_@babel+core@7.17.8 - '@babel/preset-react': 7.16.7_@babel+core@7.17.8 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.1_06cd85ae30adde416cafc06517ba554d - '@storybook/addons': 6.4.19 - '@storybook/core': 6.4.19_9a8ff0004ea215335da87f71ceba5c57 - '@storybook/core-common': 6.4.19_28bcd63db444ce2c431359704a8c8a5d - '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/node-logger': 6.4.19 - '@storybook/react-docgen-typescript-plugin': 1.0.2-canary.253f8c1.0_typescript@4.6.2+webpack@4.46.0 - '@storybook/semver': 7.3.2 - '@storybook/store': 6.4.19 - '@types/webpack-env': 1.16.3 - babel-plugin-add-react-displayname: 0.0.5 - babel-plugin-named-asset-import: 0.3.8_@babel+core@7.17.8 - babel-plugin-react-docgen: 4.2.1 - core-js: 3.21.1 - global: 4.4.0 - lodash: 4.17.21 - prop-types: 15.8.1 - react-refresh: 0.11.0 - read-pkg-up: 7.0.1 - regenerator-runtime: 0.13.9 - ts-dedent: 2.2.0 - typescript: 4.6.2 - webpack: 4.46.0_webpack-cli@3.3.12 - transitivePeerDependencies: - - '@storybook/builder-webpack5' - - '@storybook/manager-webpack5' - - '@types/react' - - '@types/webpack' - - acorn - - bufferutil - - encoding - - eslint - - sockjs-client - - supports-color - - type-fest - - utf-8-validate - - vue-template-compiler - - webpack-cli - - webpack-command - - webpack-dev-server - - webpack-hot-middleware - - webpack-plugin-serve - dev: true - /@storybook/react/6.4.19_9f1f8f17cdd455b6ef8e501a921b145c: resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==} engines: {node: '>=10.13.0'} @@ -11330,6 +11378,68 @@ packages: - webpack-plugin-serve dev: true + /@storybook/react/6.4.19_df9bce9a6d10cedcb22cc302b49e05b8: + resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + '@babel/core': ^7.11.5 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + '@babel/core': + optional: true + typescript: + optional: true + dependencies: + '@babel/core': 7.17.8 + '@babel/preset-flow': 7.16.7_@babel+core@7.17.8 + '@babel/preset-react': 7.16.7_@babel+core@7.17.8 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.1_06cd85ae30adde416cafc06517ba554d + '@storybook/addons': 6.4.19 + '@storybook/core': 6.4.19_0aa9eeaa726e2cf1920b2ebcd5c10136 + '@storybook/core-common': 6.4.19_ad5fc232a476648e022b673b2e1293fc + '@storybook/csf': 0.0.2--canary.87bc651.0 + '@storybook/node-logger': 6.4.19 + '@storybook/react-docgen-typescript-plugin': 1.0.2-canary.253f8c1.0_typescript@4.6.2+webpack@4.46.0 + '@storybook/semver': 7.3.2 + '@storybook/store': 6.4.19 + '@types/webpack-env': 1.16.3 + babel-plugin-add-react-displayname: 0.0.5 + babel-plugin-named-asset-import: 0.3.8_@babel+core@7.17.8 + babel-plugin-react-docgen: 4.2.1 + core-js: 3.21.1 + global: 4.4.0 + lodash: 4.17.21 + prop-types: 15.8.1 + react-refresh: 0.11.0 + read-pkg-up: 7.0.1 + regenerator-runtime: 0.13.9 + ts-dedent: 2.2.0 + typescript: 4.6.2 + webpack: 4.46.0_webpack-cli@3.3.12 + transitivePeerDependencies: + - '@storybook/builder-webpack5' + - '@storybook/manager-webpack5' + - '@types/react' + - '@types/webpack' + - acorn + - bufferutil + - encoding + - eslint + - sockjs-client + - supports-color + - type-fest + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-command + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /@storybook/router/6.4.19: resolution: {integrity: sha512-KWWwIzuyeEIWVezkCihwY2A76Il9tUNg0I410g9qT7NrEsKyqXGRYOijWub7c1GGyNjLqz0jtrrehtixMcJkuA==} peerDependencies: @@ -12475,6 +12585,84 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin/5.15.0_c8b324c35d270b9e6d84e3592e846620: + resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': 5.15.0_eslint@8.12.0+typescript@4.6.2 + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/type-utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 + '@typescript-eslint/utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 + debug: 4.3.3 + eslint: 8.12.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.5 + tsutils: 3.21.0_typescript@4.6.2 + typescript: 4.6.2 + transitivePeerDependencies: + - supports-color + + /@typescript-eslint/eslint-plugin/5.15.0_db3cd493186c3234b80a3843c7aaf877: + resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': 5.15.0_typescript@4.2.4 + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/type-utils': 5.15.0_typescript@4.2.4 + '@typescript-eslint/utils': 5.15.0_typescript@4.2.4 + debug: 4.3.3 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.5 + tsutils: 3.21.0_typescript@4.2.4 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/eslint-plugin/5.15.0_eslint@8.12.0+typescript@4.6.2: + resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/type-utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 + '@typescript-eslint/utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 + debug: 4.3.3 + eslint: 8.12.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.5 + tsutils: 3.21.0_typescript@4.6.2 + typescript: 4.6.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/eslint-plugin/5.15.0_f2c49ce7d0e93ebcfdb4b7d25b131b28: resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -12500,30 +12688,6 @@ packages: typescript: 4.6.2 transitivePeerDependencies: - supports-color - - /@typescript-eslint/eslint-plugin/5.15.0_typescript@4.6.2: - resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.15.0 - '@typescript-eslint/type-utils': 5.15.0_typescript@4.6.2 - '@typescript-eslint/utils': 5.15.0_typescript@4.6.2 - debug: 4.3.3 - functional-red-black-tree: 1.0.1 - ignore: 5.2.0 - regexpp: 3.2.0 - semver: 7.3.5 - tsutils: 3.21.0_typescript@4.6.2 - typescript: 4.6.2 - transitivePeerDependencies: - - supports-color dev: true /@typescript-eslint/eslint-plugin/5.3.0_ef742ec0d85d332d26b421951e243e75: @@ -12677,6 +12841,24 @@ packages: transitivePeerDependencies: - supports-color - typescript + dev: true + + /@typescript-eslint/experimental-utils/5.4.0_eslint@8.12.0+typescript@4.6.2: + resolution: {integrity: sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + dependencies: + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.4.0 + '@typescript-eslint/types': 5.4.0 + '@typescript-eslint/typescript-estree': 5.4.0_typescript@4.6.2 + eslint: 8.12.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.12.0 + transitivePeerDependencies: + - supports-color + - typescript /@typescript-eslint/experimental-utils/5.4.0_eslint@8.2.0+typescript@4.4.4: resolution: {integrity: sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==} @@ -12696,6 +12878,23 @@ packages: - typescript dev: true + /@typescript-eslint/experimental-utils/5.4.0_typescript@4.2.4: + resolution: {integrity: sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + dependencies: + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.4.0 + '@typescript-eslint/types': 5.4.0 + '@typescript-eslint/typescript-estree': 5.4.0_typescript@4.2.4 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/parser/3.10.1_eslint@6.8.0+typescript@3.9.7: resolution: {integrity: sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -12735,6 +12934,45 @@ packages: typescript: 4.6.2 transitivePeerDependencies: - supports-color + dev: true + + /@typescript-eslint/parser/5.15.0_eslint@8.12.0+typescript@4.6.2: + resolution: {integrity: sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/types': 5.15.0 + '@typescript-eslint/typescript-estree': 5.15.0_typescript@4.6.2 + debug: 4.3.3 + eslint: 8.12.0 + typescript: 4.6.2 + transitivePeerDependencies: + - supports-color + + /@typescript-eslint/parser/5.15.0_typescript@4.2.4: + resolution: {integrity: sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/types': 5.15.0 + '@typescript-eslint/typescript-estree': 5.15.0_typescript@4.2.4 + debug: 4.3.3 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color + dev: true /@typescript-eslint/parser/5.3.0_eslint@8.1.0+typescript@4.2.4: resolution: {integrity: sha512-rKu/yAReip7ovx8UwOAszJVO5MgBquo8WjIQcp1gx4pYQCwYzag+I5nVNHO4MqyMkAo0gWt2gWUi+36gWAVKcw==} @@ -12815,8 +13053,9 @@ packages: typescript: 4.6.2 transitivePeerDependencies: - supports-color + dev: true - /@typescript-eslint/type-utils/5.15.0_typescript@4.6.2: + /@typescript-eslint/type-utils/5.15.0_eslint@8.12.0+typescript@4.6.2: resolution: {integrity: sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -12826,12 +13065,30 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.15.0_typescript@4.6.2 + '@typescript-eslint/utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 debug: 4.3.3 + eslint: 8.12.0 tsutils: 3.21.0_typescript@4.6.2 typescript: 4.6.2 transitivePeerDependencies: - supports-color + + /@typescript-eslint/type-utils/5.15.0_typescript@4.2.4: + resolution: {integrity: sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/utils': 5.15.0_typescript@4.2.4 + debug: 4.3.3 + tsutils: 3.21.0_typescript@4.2.4 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color dev: true /@typescript-eslint/types/3.10.1: @@ -12937,6 +13194,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree/5.15.0_typescript@4.2.4: + resolution: {integrity: sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.15.0 + '@typescript-eslint/visitor-keys': 5.15.0 + debug: 4.3.3 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.5 + tsutils: 3.21.0_typescript@4.2.4 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree/5.15.0_typescript@4.6.2: resolution: {integrity: sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -12978,6 +13256,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree/5.4.0_typescript@4.2.4: + resolution: {integrity: sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.4.0 + '@typescript-eslint/visitor-keys': 5.4.0 + debug: 4.3.2 + globby: 11.0.4 + is-glob: 4.0.3 + semver: 7.3.5 + tsutils: 3.21.0_typescript@4.2.4 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree/5.4.0_typescript@4.4.4: resolution: {integrity: sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -13035,8 +13334,9 @@ packages: transitivePeerDependencies: - supports-color - typescript + dev: true - /@typescript-eslint/utils/5.15.0_typescript@4.6.2: + /@typescript-eslint/utils/5.15.0_eslint@8.12.0+typescript@4.6.2: resolution: {integrity: sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -13046,6 +13346,23 @@ packages: '@typescript-eslint/scope-manager': 5.15.0 '@typescript-eslint/types': 5.15.0 '@typescript-eslint/typescript-estree': 5.15.0_typescript@4.6.2 + eslint: 8.12.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.12.0 + transitivePeerDependencies: + - supports-color + - typescript + + /@typescript-eslint/utils/5.15.0_typescript@4.2.4: + resolution: {integrity: sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.15.0 + '@typescript-eslint/types': 5.15.0 + '@typescript-eslint/typescript-estree': 5.15.0_typescript@4.2.4 eslint-scope: 5.1.1 eslint-utils: 3.0.0 transitivePeerDependencies: @@ -13080,7 +13397,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.4.0 - eslint-visitor-keys: 3.0.0 + eslint-visitor-keys: 3.3.0 /@use-gesture/core/10.2.10: resolution: {integrity: sha512-7WFIDfeTB+7RBui8YOrB2xbgmvMsvaCDjyzrdvECKkgOpIynNSdhlLXjiFuqQMtnK71IL/9WNZNU0P8xuaLuUQ==} @@ -14191,6 +14508,83 @@ packages: transitivePeerDependencies: - jest - supports-color + dev: true + + /@wordpress/eslint-plugin/11.0.1_7c040a9b494a33cf8bf9079642892fb1: + resolution: {integrity: sha512-HDKwKjOmCaWdyJEtWKRAd0xK/NAXL/ykUP/I8l+zCvzvCXbS1UuixWN09RRzl09tv17JUtPiEqehDilkWRCBZg==} + engines: {node: '>=12', npm: '>=6.9'} + peerDependencies: + '@babel/core': '>=7' + eslint: '>=8' + prettier: '>=2' + typescript: '>=4' + peerDependenciesMeta: + prettier: + optional: true + typescript: + optional: true + dependencies: + '@babel/core': 7.17.8 + '@babel/eslint-parser': 7.17.0_@babel+core@7.17.8+eslint@8.12.0 + '@typescript-eslint/eslint-plugin': 5.15.0_c8b324c35d270b9e6d84e3592e846620 + '@typescript-eslint/parser': 5.15.0_eslint@8.12.0+typescript@4.6.2 + '@wordpress/babel-preset-default': 6.6.1 + '@wordpress/prettier-config': 1.1.3 + cosmiconfig: 7.0.1 + eslint: 8.12.0 + eslint-config-prettier: 8.5.0_eslint@8.12.0 + eslint-plugin-import: 2.25.4_eslint@8.12.0 + eslint-plugin-jest: 25.7.0_6bef967891becc1ab6057e2949a5834f + eslint-plugin-jsdoc: 37.9.7_eslint@8.12.0 + eslint-plugin-jsx-a11y: 6.5.1_eslint@8.12.0 + eslint-plugin-prettier: 3.4.1_4f868ac8ce75e6aed4937833d4c4f6d9 + eslint-plugin-react: 7.29.4_eslint@8.12.0 + eslint-plugin-react-hooks: 4.3.0_eslint@8.12.0 + globals: 13.12.0 + prettier: /wp-prettier/2.2.1-beta-1 + requireindex: 1.2.0 + typescript: 4.6.2 + transitivePeerDependencies: + - jest + - supports-color + + /@wordpress/eslint-plugin/11.0.1_e97ea7521b9baec0e8686a2ccc3f1625: + resolution: {integrity: sha512-HDKwKjOmCaWdyJEtWKRAd0xK/NAXL/ykUP/I8l+zCvzvCXbS1UuixWN09RRzl09tv17JUtPiEqehDilkWRCBZg==} + engines: {node: '>=12', npm: '>=6.9'} + peerDependencies: + '@babel/core': '>=7' + eslint: '>=8' + prettier: '>=2' + typescript: '>=4' + peerDependenciesMeta: + prettier: + optional: true + typescript: + optional: true + dependencies: + '@babel/core': 7.12.9 + '@babel/eslint-parser': 7.17.0_@babel+core@7.12.9 + '@typescript-eslint/eslint-plugin': 5.15.0_db3cd493186c3234b80a3843c7aaf877 + '@typescript-eslint/parser': 5.15.0_typescript@4.2.4 + '@wordpress/babel-preset-default': 6.6.1 + '@wordpress/prettier-config': 1.1.3 + cosmiconfig: 7.0.1 + eslint-config-prettier: 8.5.0 + eslint-plugin-import: 2.25.4 + eslint-plugin-jest: 25.7.0_a17cfd3e96203023414471d4aee9df06 + eslint-plugin-jsdoc: 37.9.7 + eslint-plugin-jsx-a11y: 6.5.1 + eslint-plugin-prettier: 3.4.1_a80e9f01b6decf22ea798f6e74ee3e78 + eslint-plugin-react: 7.29.4 + eslint-plugin-react-hooks: 4.3.0 + globals: 13.12.0 + prettier: /wp-prettier/2.2.1-beta-1 + requireindex: 1.2.0 + typescript: 4.2.4 + transitivePeerDependencies: + - jest + - supports-color + dev: true /@wordpress/eslint-plugin/7.3.0_eslint@6.8.0+typescript@3.9.7: resolution: {integrity: sha512-7wIFzzc14E1XuuT9haBuhoA9FRUGWlbD4Oek+XkiZlzNVqZI3slgbtIFJ6/Mfij1V18rv6Ns9a1cPJLtCU8JHQ==} @@ -14943,6 +15337,7 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.7.0 + dev: true /acorn-walk/6.2.0: resolution: {integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==} @@ -14984,6 +15379,7 @@ packages: resolution: {integrity: sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==} engines: {node: '>=0.4.0'} hasBin: true + dev: true /address/1.1.2: resolution: {integrity: sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==} @@ -15306,6 +15702,7 @@ packages: /argparse/2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true /aria-query/4.2.2: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} @@ -20072,6 +20469,13 @@ packages: get-stdin: 6.0.0 dev: true + /eslint-config-prettier/8.5.0: + resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dev: true + /eslint-config-prettier/8.5.0_eslint@8.11.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true @@ -20079,6 +20483,15 @@ packages: eslint: '>=7.0.0' dependencies: eslint: 8.11.0 + dev: true + + /eslint-config-prettier/8.5.0_eslint@8.12.0: + resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.12.0 /eslint-config-wpcalypso/5.0.0_eslint@6.8.0: resolution: {integrity: sha512-bENkOkC7Hk2LREkj9aVqv5ELqYaUZqN2IBtmCdsQXrkJBsW8FV9mOzcBHnLm3Cvw4YYfq0rZzIFuCs3pkPbe1Q==} @@ -20144,6 +20557,27 @@ packages: debug: 3.2.7 find-up: 2.1.0 + /eslint-plugin-import/2.25.4: + resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + dependencies: + array-includes: 3.1.4 + array.prototype.flat: 1.2.5 + debug: 2.6.9 + doctrine: 2.1.0 + eslint-import-resolver-node: 0.3.6 + eslint-module-utils: 2.7.3 + has: 1.0.3 + is-core-module: 2.8.0 + is-glob: 4.0.3 + minimatch: 3.0.4 + object.values: 1.1.5 + resolve: 1.20.0 + tsconfig-paths: 3.14.0 + dev: true + /eslint-plugin-import/2.25.4_eslint@8.11.0: resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} engines: {node: '>=4'} @@ -20164,6 +20598,28 @@ packages: object.values: 1.1.5 resolve: 1.20.0 tsconfig-paths: 3.14.0 + dev: true + + /eslint-plugin-import/2.25.4_eslint@8.12.0: + resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + dependencies: + array-includes: 3.1.4 + array.prototype.flat: 1.2.5 + debug: 2.6.9 + doctrine: 2.1.0 + eslint: 8.12.0 + eslint-import-resolver-node: 0.3.6 + eslint-module-utils: 2.7.3 + has: 1.0.3 + is-core-module: 2.8.0 + is-glob: 4.0.3 + minimatch: 3.0.4 + object.values: 1.1.5 + resolve: 1.20.0 + tsconfig-paths: 3.14.0 /eslint-plugin-jest/23.20.0_eslint@6.8.0+typescript@3.9.7: resolution: {integrity: sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==} @@ -20204,6 +20660,27 @@ packages: - typescript dev: true + /eslint-plugin-jest/25.7.0_6bef967891becc1ab6057e2949a5834f: + resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + jest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + jest: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 5.15.0_c8b324c35d270b9e6d84e3592e846620 + '@typescript-eslint/experimental-utils': 5.4.0_eslint@8.12.0+typescript@4.6.2 + eslint: 8.12.0 + jest: 27.5.1 + transitivePeerDependencies: + - supports-color + - typescript + /eslint-plugin-jest/25.7.0_999503cc9dd683854c288a023c8289ec: resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -20224,6 +20701,28 @@ packages: transitivePeerDependencies: - supports-color - typescript + dev: true + + /eslint-plugin-jest/25.7.0_a17cfd3e96203023414471d4aee9df06: + resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + jest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + jest: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 5.15.0_db3cd493186c3234b80a3843c7aaf877 + '@typescript-eslint/experimental-utils': 5.4.0_typescript@4.2.4 + jest: 27.3.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: true /eslint-plugin-jsdoc/30.7.13_eslint@6.8.0: resolution: {integrity: sha512-YM4WIsmurrp0rHX6XiXQppqKB8Ne5ATiZLJe2+/fkp9l9ExXFr43BbAbjZaVrpCT+tuPYOZ8k1MICARHnURUNQ==} @@ -20279,6 +20778,24 @@ packages: - supports-color dev: true + /eslint-plugin-jsdoc/37.9.7: + resolution: {integrity: sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g==} + engines: {node: ^12 || ^14 || ^16 || ^17} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@es-joy/jsdoccomment': 0.20.1 + comment-parser: 1.3.0 + debug: 4.3.3 + escape-string-regexp: 4.0.0 + esquery: 1.4.0 + regextras: 0.8.0 + semver: 7.3.5 + spdx-expression-parse: 3.0.1 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-jsdoc/37.9.7_eslint@8.11.0: resolution: {integrity: sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g==} engines: {node: ^12 || ^14 || ^16 || ^17} @@ -20296,6 +20813,45 @@ packages: spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color + dev: true + + /eslint-plugin-jsdoc/37.9.7_eslint@8.12.0: + resolution: {integrity: sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g==} + engines: {node: ^12 || ^14 || ^16 || ^17} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@es-joy/jsdoccomment': 0.20.1 + comment-parser: 1.3.0 + debug: 4.3.3 + escape-string-regexp: 4.0.0 + eslint: 8.12.0 + esquery: 1.4.0 + regextras: 0.8.0 + semver: 7.3.5 + spdx-expression-parse: 3.0.1 + transitivePeerDependencies: + - supports-color + + /eslint-plugin-jsx-a11y/6.5.1: + resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + '@babel/runtime': 7.17.7 + aria-query: 4.2.2 + array-includes: 3.1.4 + ast-types-flow: 0.0.7 + axe-core: 4.3.5 + axobject-query: 2.2.0 + damerau-levenshtein: 1.0.7 + emoji-regex: 9.2.2 + has: 1.0.3 + jsx-ast-utils: 3.2.1 + language-tags: 1.0.5 + minimatch: 3.1.2 + dev: true /eslint-plugin-jsx-a11y/6.5.1_eslint@6.8.0: resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} @@ -20303,7 +20859,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.16.3 + '@babel/runtime': 7.17.7 aria-query: 4.2.2 array-includes: 3.1.4 ast-types-flow: 0.0.7 @@ -20315,7 +20871,7 @@ packages: has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 - minimatch: 3.0.4 + minimatch: 3.1.2 dev: true /eslint-plugin-jsx-a11y/6.5.1_eslint@7.32.0: @@ -20324,7 +20880,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.16.3 + '@babel/runtime': 7.17.7 aria-query: 4.2.2 array-includes: 3.1.4 ast-types-flow: 0.0.7 @@ -20336,7 +20892,7 @@ packages: has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 - minimatch: 3.0.4 + minimatch: 3.1.2 dev: true /eslint-plugin-jsx-a11y/6.5.1_eslint@8.11.0: @@ -20345,7 +20901,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.16.3 + '@babel/runtime': 7.17.7 aria-query: 4.2.2 array-includes: 3.1.4 ast-types-flow: 0.0.7 @@ -20357,7 +20913,28 @@ packages: has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 - minimatch: 3.0.4 + minimatch: 3.1.2 + dev: true + + /eslint-plugin-jsx-a11y/6.5.1_eslint@8.12.0: + resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + '@babel/runtime': 7.17.7 + aria-query: 4.2.2 + array-includes: 3.1.4 + ast-types-flow: 0.0.7 + axe-core: 4.3.5 + axobject-query: 2.2.0 + damerau-levenshtein: 1.0.7 + emoji-regex: 9.2.2 + eslint: 8.12.0 + has: 1.0.3 + jsx-ast-utils: 3.2.1 + language-tags: 1.0.5 + minimatch: 3.1.2 /eslint-plugin-jsx-a11y/6.5.1_eslint@8.2.0: resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} @@ -20365,7 +20942,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.16.3 + '@babel/runtime': 7.17.7 aria-query: 4.2.2 array-includes: 3.1.4 ast-types-flow: 0.0.7 @@ -20377,7 +20954,7 @@ packages: has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 - minimatch: 3.0.4 + minimatch: 3.1.2 dev: true /eslint-plugin-markdown/1.0.2: @@ -20421,6 +20998,23 @@ packages: eslint-config-prettier: 8.5.0_eslint@8.11.0 prettier: /wp-prettier/2.2.1-beta-1 prettier-linter-helpers: 1.0.0 + dev: true + + /eslint-plugin-prettier/3.4.1_4f868ac8ce75e6aed4937833d4c4f6d9: + resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} + engines: {node: '>=6.0.0'} + peerDependencies: + eslint: '>=5.0.0' + eslint-config-prettier: '*' + prettier: '>=1.13.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint: 8.12.0 + eslint-config-prettier: 8.5.0_eslint@8.12.0 + prettier: /wp-prettier/2.2.1-beta-1 + prettier-linter-helpers: 1.0.0 /eslint-plugin-prettier/3.4.1_a3d1a124e53dbc217d8b5198036499fa: resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} @@ -20439,6 +21033,22 @@ packages: prettier-linter-helpers: 1.0.0 dev: true + /eslint-plugin-prettier/3.4.1_a80e9f01b6decf22ea798f6e74ee3e78: + resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} + engines: {node: '>=6.0.0'} + peerDependencies: + eslint: '>=5.0.0' + eslint-config-prettier: '*' + prettier: '>=1.13.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint-config-prettier: 8.5.0 + prettier: /wp-prettier/2.2.1-beta-1 + prettier-linter-helpers: 1.0.0 + dev: true + /eslint-plugin-prettier/3.4.1_c9a99bfb2ee2af6122c24fded4a635d5: resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} engines: {node: '>=6.0.0'} @@ -20465,6 +21075,13 @@ packages: eslint: 6.8.0 dev: true + /eslint-plugin-react-hooks/4.3.0: + resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dev: true + /eslint-plugin-react-hooks/4.3.0_eslint@6.8.0: resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} engines: {node: '>=10'} @@ -20490,6 +21107,15 @@ packages: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: eslint: 8.11.0 + dev: true + + /eslint-plugin-react-hooks/4.3.0_eslint@8.12.0: + resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.12.0 /eslint-plugin-react-hooks/4.3.0_eslint@8.2.0: resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} @@ -20546,6 +21172,28 @@ packages: string.prototype.matchall: 4.0.6 dev: true + /eslint-plugin-react/7.29.4: + resolution: {integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + array-includes: 3.1.4 + array.prototype.flatmap: 1.2.5 + doctrine: 2.1.0 + estraverse: 5.3.0 + jsx-ast-utils: 3.2.1 + minimatch: 3.1.2 + object.entries: 1.1.5 + object.fromentries: 2.0.5 + object.hasown: 1.1.0 + object.values: 1.1.5 + prop-types: 15.8.1 + resolve: 2.0.0-next.3 + semver: 6.3.0 + string.prototype.matchall: 4.0.6 + dev: true + /eslint-plugin-react/7.29.4_eslint@7.32.0: resolution: {integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==} engines: {node: '>=4'} @@ -20590,15 +21238,38 @@ packages: resolve: 2.0.0-next.3 semver: 6.3.0 string.prototype.matchall: 4.0.6 + dev: true - /eslint-plugin-testing-library/5.1.0_eslint@8.11.0+typescript@4.6.2: + /eslint-plugin-react/7.29.4_eslint@8.12.0: + resolution: {integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + array-includes: 3.1.4 + array.prototype.flatmap: 1.2.5 + doctrine: 2.1.0 + eslint: 8.12.0 + estraverse: 5.3.0 + jsx-ast-utils: 3.2.1 + minimatch: 3.1.2 + object.entries: 1.1.5 + object.fromentries: 2.0.5 + object.hasown: 1.1.0 + object.values: 1.1.5 + prop-types: 15.8.1 + resolve: 2.0.0-next.3 + semver: 6.3.0 + string.prototype.matchall: 4.0.6 + + /eslint-plugin-testing-library/5.1.0_eslint@8.12.0+typescript@4.6.2: resolution: {integrity: sha512-YSNzasJUbyhOTe14ZPygeOBvcPvcaNkwHwrj4vdf+uirr2D32JTDaKi6CP5Os2aWtOcvt4uBSPXp9h5xGoqvWQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} peerDependencies: eslint: ^7.5.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 - eslint: 8.11.0 + '@typescript-eslint/utils': 5.15.0_eslint@8.12.0+typescript@4.6.2 + eslint: 8.12.0 transitivePeerDependencies: - supports-color - typescript @@ -20633,6 +21304,7 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + dev: true /eslint-utils/1.4.3: resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==} @@ -20674,6 +21346,16 @@ packages: dependencies: eslint: 8.11.0 eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.12.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.12.0 + eslint-visitor-keys: 2.1.0 /eslint-utils/3.0.0_eslint@8.2.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} @@ -20696,6 +21378,7 @@ packages: /eslint-visitor-keys/3.0.0: resolution: {integrity: sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true /eslint-visitor-keys/3.3.0: resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} @@ -20976,6 +21659,51 @@ packages: v8-compile-cache: 2.3.0 transitivePeerDependencies: - supports-color + dev: true + + /eslint/8.12.0: + resolution: {integrity: sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.2.1 + '@humanwhocodes/config-array': 0.9.5 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.3 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.12.0 + eslint-visitor-keys: 3.3.0 + espree: 9.3.1 + esquery: 1.4.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 6.0.2 + globals: 13.12.0 + ignore: 5.2.0 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - supports-color + dev: true /eslint/8.2.0: resolution: {integrity: sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==} @@ -21066,6 +21794,7 @@ packages: acorn: 8.7.0 acorn-jsx: 5.3.2_acorn@8.7.0 eslint-visitor-keys: 3.3.0 + dev: true /esprima/2.7.3: resolution: {integrity: sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=} @@ -21355,6 +22084,15 @@ packages: jest-message-util: 27.5.1 dev: true + /expose-loader/3.1.0_webpack@5.70.0: + resolution: {integrity: sha512-2RExSo0yJiqP+xiUue13jQa2IHE8kLDzTI7b6kn+vUlBVvlzNSiLDzo4e5Pp5J039usvTUnxZ8sUOhv0Kg15NA==} + engines: {node: '>= 12.13.0'} + peerDependencies: + webpack: ^5.0.0 + dependencies: + webpack: 5.70.0_webpack-cli@4.9.2 + dev: true + /express/4.17.1: resolution: {integrity: sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==} engines: {node: '>= 0.10.0'} @@ -21600,6 +22338,7 @@ packages: engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.0.4 + dev: true /file-loader/6.2.0_webpack@4.46.0: resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} @@ -21879,6 +22618,7 @@ packages: dependencies: flatted: 3.2.4 rimraf: 3.0.2 + dev: true /flat/4.1.1: resolution: {integrity: sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==} @@ -21897,6 +22637,7 @@ packages: /flatted/3.2.4: resolution: {integrity: sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==} + dev: true /flush-write-stream/1.1.1: resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} @@ -22063,7 +22804,7 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 dev: true - /fork-ts-checker-webpack-plugin/6.5.0_typescript@4.6.2+webpack@4.46.0: + /fork-ts-checker-webpack-plugin/6.5.0_ec34b068c8cf37561abcf5fd5b20a134: resolution: {integrity: sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw==} engines: {node: '>=10', yarn: '>=1.0.0'} peerDependencies: @@ -22083,6 +22824,7 @@ packages: chokidar: 3.5.3 cosmiconfig: 6.0.0 deepmerge: 4.2.2 + eslint: 8.12.0 fs-extra: 9.1.0 glob: 7.2.0 memfs: 3.3.0 @@ -22529,6 +23271,7 @@ packages: engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 + dev: true /glob-promise/3.4.0_glob@7.2.0: resolution: {integrity: sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==} @@ -27133,6 +27876,7 @@ packages: hasBin: true dependencies: argparse: 2.0.1 + dev: true /jsbn/0.1.1: resolution: {integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM=} @@ -27545,6 +28289,7 @@ packages: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 + dev: true /license-webpack-plugin/2.3.15: resolution: {integrity: sha512-reA0yvwvkkFMRsyqVikTcLGFXmgWKPVXrFaR3tRvAnFoZozM4zvwlNNQxuB5Il6fgTtS7nGkrIPm9xS2KZtu7g==} @@ -29904,6 +30649,7 @@ packages: prelude-ls: 1.2.1 type-check: 0.4.0 word-wrap: 1.2.3 + dev: true /opts/2.0.2: resolution: {integrity: sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==} @@ -31865,6 +32611,7 @@ packages: /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + dev: true /prepend-http/1.0.4: resolution: {integrity: sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=} @@ -33338,7 +34085,7 @@ packages: resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} engines: {node: '>=0.10'} dependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 micromatch: 3.1.10 readable-stream: 2.3.7 dev: true @@ -36205,7 +36952,7 @@ packages: serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.10.0_acorn@8.7.0 - webpack: 5.70.0_webpack-cli@3.3.12 + webpack: 5.70.0 transitivePeerDependencies: - acorn dev: true @@ -36361,7 +37108,7 @@ packages: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.0 - minimatch: 3.0.4 + minimatch: 3.1.2 /text-table/0.2.0: resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} @@ -36942,6 +37689,7 @@ packages: engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 + dev: true /type-detect/4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} @@ -37031,6 +37779,7 @@ packages: resolution: {integrity: sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==} engines: {node: '>=0.8.0'} hasBin: true + requiresBuild: true dev: true /unbox-primitive/1.0.1: diff --git a/tsconfig.base.json b/tsconfig.base.json index 15651cb48ce..b92f8e572ec 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -28,5 +28,33 @@ /* This needs to be false so our types are possible to consume without setting this */ "esModuleInterop": false, "resolveJsonModule": true - } + }, + + /* + We set files: [] here so that running tsc against this config does not pick up anything, + but only delegates the tsc command execution to the projects specified in references[] + More at: https://www.typescriptlang.org/docs/handbook/project-references.html + */ + "files": [], + + "references": [ + { "path": "./plugins/woocommerce/" }, + { "path": "./plugins/woocommerce-admin/" }, + { "path": "./packages/js/admin-e2e-tests" }, + { "path": "./packages/js/api" }, + { "path": "./packages/js/components" }, + { "path": "./packages/js/csv-export" }, + { "path": "./packages/js/currency" }, + { "path": "./packages/js/customer-effort-score" }, + { "path": "./packages/js/data" }, + { "path": "./packages/js/date" }, + { "path": "./packages/js/experimental" }, + { "path": "./packages/js/explat" }, + { "path": "./packages/js/js-tests" }, + { "path": "./packages/js/navigation" }, + { "path": "./packages/js/notices" }, + { "path": "./packages/js/number" }, + { "path": "./packages/js/onboarding" }, + { "path": "./packages/js/tracks" } + ] }