From f2c1bcb86afc45f535d8b872e8a670506ff68acb Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 17 Nov 2023 13:43:07 -0500 Subject: [PATCH] Declare PHP version requirement in all Composer packages This makes for a better experience for third parties using the packages, as they can see on Packagist which PHP versions the package is supposed to support. Also this is a good excuse to make a major version bump for all the packages following #34126 which removed testing with PHP 5.6 and allows use of 7.0+ features going forward. And since we're making systematic use of declared PHP versions now, let's lint for that and make use of it to skip phpunit tests where appropriate. --- .github/files/lint-project-structure.sh | 9 ++++++++- .github/workflows/tests.yml | 2 ++ .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/a8c-mc-stats/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/abtest/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/action-bar/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/admin-ui/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/analyzer/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/assets/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/autoloader/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/backup/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/blaze/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/blocks/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/boost-core/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/boost-speed-score/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/chatbot/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/codesniffer/composer.json | 4 +--- .../packages/codesniffer/tests/action-skip-test-php.sh | 6 ------ .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/compat/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/composer-plugin/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/config/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/connection/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/constants/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/device-detection/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/error/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/forms/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/google-fonts-provider/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/heartbeat/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/identity-crisis/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/ignorefile/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/image-cdn/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/import/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/ip/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/jetpack-mu-wpcom/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/jitm/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/lazy-images/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/licensing/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/logo/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/my-jetpack/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/options/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/partner/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/password-checker/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/phpcs-filter/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/plans/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/plugin-deactivation/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/plugins-installer/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/post-list/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/publicize/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/redirect/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/roles/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/search/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/stats-admin/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/stats/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/status/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/sync/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/tracking/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/transport-helper/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/videopress/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/waf/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/wordads/composer.json | 1 + .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/wp-js-data-sync/composer.json | 4 +++- .../add-declare-php-version-for-all-composer-packages | 4 ++++ projects/packages/yoast-promo/composer.json | 4 +++- tools/cli/commands/generate.js | 2 ++ 120 files changed, 338 insertions(+), 28 deletions(-) create mode 100644 projects/packages/a8c-mc-stats/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/abtest/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/action-bar/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/admin-ui/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/analyzer/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/assets/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/autoloader/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/backup/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/blaze/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/blocks/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/boost-core/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/boost-speed-score/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/chatbot/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/codesniffer/changelog/add-declare-php-version-for-all-composer-packages delete mode 100755 projects/packages/codesniffer/tests/action-skip-test-php.sh create mode 100644 projects/packages/compat/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/composer-plugin/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/config/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/connection/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/constants/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/device-detection/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/error/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/forms/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/google-fonts-provider/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/heartbeat/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/identity-crisis/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/ignorefile/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/image-cdn/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/import/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/ip/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/jitm/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/lazy-images/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/licensing/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/logo/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/my-jetpack/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/options/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/partner/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/password-checker/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/phpcs-filter/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/plans/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/plugin-deactivation/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/plugins-installer/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/post-list/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/publicize/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/redirect/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/roles/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/search/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/stats-admin/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/stats/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/status/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/sync/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/tracking/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/transport-helper/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/videopress/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/waf/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/wordads/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/wp-js-data-sync/changelog/add-declare-php-version-for-all-composer-packages create mode 100644 projects/packages/yoast-promo/changelog/add-declare-php-version-for-all-composer-packages diff --git a/.github/files/lint-project-structure.sh b/.github/files/lint-project-structure.sh index f8a760bbdc6b6..416f4a6cd0b5d 100755 --- a/.github/files/lint-project-structure.sh +++ b/.github/files/lint-project-structure.sh @@ -7,6 +7,7 @@ cd $(dirname "${BASH_SOURCE[0]}")/../.. BASE=$PWD . "$BASE/tools/includes/check-osx-bash-version.sh" . "$BASE/tools/includes/chalk-lite.sh" +. "$BASE/.github/versions.sh" if [[ -n "$CI" ]]; then function debug { @@ -226,6 +227,13 @@ for PROJECT in projects/*/*; do echo "::error file=$PROJECT/composer.json::Package $SLUG should set \`.extra.branch-alias.dev-trunk\` in composer.json." fi + # - Packages must set `.require.php`. + if [[ "$TYPE" == "packages" ]] && ! jq -e '.require.php // null' "$PROJECT/composer.json" >/dev/null; then + EXIT=1 + LINE=$(jq --stream -r 'if length == 1 then .[0][:-1] else .[0] end | if . == ["require"] then ",line=\( input_line_number )" else empty end' "$PROJECT/composer.json") + echo "::error file=$PROJECT/composer.json$LINE::Package $SLUG should set \`.require.php\` in composer.json (probably to \">=$MIN_PHP_VERSION\")." + fi + SUGGESTION="You might add this with \`composer config autoloader-suffix '$(printf "%s" "$SLUG" | md5sum | sed -e 's/[[:space:]]*-$//')_$(sed -e 's/[^0-9a-zA-Z]/_/g' <<<"${SLUG##*/}")â“¥version'\` in the appropriate directory." # - If vendor/autoload.php or vendor/autoload_packages.php is production-included, composer.json must set .config.autoloader-suffix. @@ -453,7 +461,6 @@ for FILE in $(git -c core.quotepath=off ls-files 'projects/packages/**/.eslintrc done # - .nvmrc should match .github/versions.sh. -. .github/versions.sh debug "Checking .nvmrc vs versions.sh" if [[ "$(<.nvmrc)" != "$NODE_VERSION" ]]; then EXIT=1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7c4a7c6f6b4db..8e0b2761c448f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -135,6 +135,8 @@ jobs: echo "Skipping $SLUG, no changes in it or its dependencies" elif ! jq --arg script "$TEST_SCRIPT" -e '.scripts[$script] // false' "$P" > /dev/null; then echo "Skipping $SLUG, no test script is defined in composer.json" + elif php -r 'exit( preg_match( "/^>=\\s*(\\d+\\.\\d+)$/", $argv[1], $m ) && version_compare( PHP_VERSION, $m[1], "<" ) ? 0 : 1 );' "$( jq -r '.require.php // ""' "$P" )"; then + echo "Skipping $SLUG, requires PHP $( jq -r '.require.php // ""' "$P" ) but PHP version is $( php -r 'echo PHP_VERSION;' )" else if jq --arg script "skip-$TEST_SCRIPT" -e '.scripts[$script] // false' "$P" > /dev/null; then { composer --working-dir="$DIR" run "skip-$TEST_SCRIPT"; CODE=$?; } || true diff --git a/projects/packages/a8c-mc-stats/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/a8c-mc-stats/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/a8c-mc-stats/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/a8c-mc-stats/composer.json b/projects/packages/a8c-mc-stats/composer.json index c394c73111b3a..d15d74a783546 100644 --- a/projects/packages/a8c-mc-stats/composer.json +++ b/projects/packages/a8c-mc-stats/composer.json @@ -3,7 +3,9 @@ "description": "Used to record internal usage stats for Automattic. Not visible to site owners.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev" diff --git a/projects/packages/abtest/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/abtest/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/abtest/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/abtest/composer.json b/projects/packages/abtest/composer.json index e5783ec1f5085..d5ea1b1ca60d6 100644 --- a/projects/packages/abtest/composer.json +++ b/projects/packages/abtest/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-error": "@dev" }, diff --git a/projects/packages/action-bar/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/action-bar/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/action-bar/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/action-bar/composer.json b/projects/packages/action-bar/composer.json index be0c74824e4b5..a50e763238c74 100644 --- a/projects/packages/action-bar/composer.json +++ b/projects/packages/action-bar/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-constants": "@dev" }, diff --git a/projects/packages/admin-ui/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/admin-ui/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/admin-ui/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/admin-ui/composer.json b/projects/packages/admin-ui/composer.json index d75af9bc57dea..5153ff018c87e 100644 --- a/projects/packages/admin-ui/composer.json +++ b/projects/packages/admin-ui/composer.json @@ -3,7 +3,9 @@ "description": "Generic Jetpack wp-admin UI elements", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/analyzer/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/analyzer/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/analyzer/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/analyzer/composer.json b/projects/packages/analyzer/composer.json index 7207b7f56281a..b80c4b4202b50 100644 --- a/projects/packages/analyzer/composer.json +++ b/projects/packages/analyzer/composer.json @@ -8,6 +8,7 @@ "static analysis" ], "require": { + "php": ">=7.0", "nikic/php-parser": "4.13.2" }, "require-dev": { diff --git a/projects/packages/assets/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/assets/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/assets/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/assets/composer.json b/projects/packages/assets/composer.json index fa0db17b67695..359b650fa1799 100644 --- a/projects/packages/assets/composer.json +++ b/projects/packages/assets/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-constants": "@dev" }, "require-dev": { diff --git a/projects/packages/autoloader/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/autoloader/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/autoloader/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/autoloader/composer.json b/projects/packages/autoloader/composer.json index fc4e19f9ced9b..8d8c2d92c7cd3 100644 --- a/projects/packages/autoloader/composer.json +++ b/projects/packages/autoloader/composer.json @@ -12,6 +12,7 @@ "wordpress" ], "require": { + "php": ">=7.0", "composer-plugin-api": "^1.1 || ^2.0" }, "require-dev": { diff --git a/projects/packages/backup/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/backup/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/backup/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/backup/composer.json b/projects/packages/backup/composer.json index b294002fda247..b8a791fd04e06 100644 --- a/projects/packages/backup/composer.json +++ b/projects/packages/backup/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-admin-ui": "@dev", "automattic/jetpack-autoloader": "@dev", diff --git a/projects/packages/blaze/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/blaze/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/blaze/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/blaze/composer.json b/projects/packages/blaze/composer.json index 4be550d4064a9..6d87574826fd9 100644 --- a/projects/packages/blaze/composer.json +++ b/projects/packages/blaze/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", diff --git a/projects/packages/blocks/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/blocks/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/blocks/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/blocks/composer.json b/projects/packages/blocks/composer.json index f2ff09aae23b0..85f86b2cc1c69 100644 --- a/projects/packages/blocks/composer.json +++ b/projects/packages/blocks/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-constants": "@dev" }, "require-dev": { diff --git a/projects/packages/boost-core/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/boost-core/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/boost-core/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/boost-core/composer.json b/projects/packages/boost-core/composer.json index fa605d8fc82ee..11169dcc1dd1a 100644 --- a/projects/packages/boost-core/composer.json +++ b/projects/packages/boost-core/composer.json @@ -3,7 +3,9 @@ "description": "Core functionality for boost and relevant packages to depend on", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/boost-speed-score/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/boost-speed-score/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/boost-speed-score/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/boost-speed-score/composer.json b/projects/packages/boost-speed-score/composer.json index 9f9853140232f..08115ca7d94ec 100644 --- a/projects/packages/boost-speed-score/composer.json +++ b/projects/packages/boost-speed-score/composer.json @@ -14,6 +14,7 @@ } }, "require": { + "php": ">=7.0", "automattic/jetpack-boost-core": "@dev" }, "autoload": { diff --git a/projects/packages/chatbot/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/chatbot/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/chatbot/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/chatbot/composer.json b/projects/packages/chatbot/composer.json index 6c5ca5de3f08d..3eb7a5e0e654d 100644 --- a/projects/packages/chatbot/composer.json +++ b/projects/packages/chatbot/composer.json @@ -3,7 +3,9 @@ "description": "Helpful chatbots for you and your visitors", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/codesniffer/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/codesniffer/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..ae5e60d3f8f6c --- /dev/null +++ b/projects/packages/codesniffer/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Declare requirement of PHP >= 7.4. diff --git a/projects/packages/codesniffer/composer.json b/projects/packages/codesniffer/composer.json index c96b7be825aa2..5cb240cf5ffb8 100644 --- a/projects/packages/codesniffer/composer.json +++ b/projects/packages/codesniffer/composer.json @@ -12,6 +12,7 @@ "testing" ], "require": { + "php": ">=7.4", "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "mediawiki/mediawiki-codesniffer": "^41.0", "phpcompatibility/phpcompatibility-wp": "^2.1", @@ -35,9 +36,6 @@ "phpunit": [ "./vendor/phpunit/phpunit/phpunit --colors=always" ], - "skip-test-php": [ - "./tests/action-skip-test-php.sh" - ], "test-php": [ "@composer phpunit" ] diff --git a/projects/packages/codesniffer/tests/action-skip-test-php.sh b/projects/packages/codesniffer/tests/action-skip-test-php.sh deleted file mode 100755 index e80157348bb33..0000000000000 --- a/projects/packages/codesniffer/tests/action-skip-test-php.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -if php -r 'exit( version_compare( PHP_VERSION, "7.4.0", "<" ) ? 0 : 1 );'; then - echo "PHP version is too old to run tests. 7.4 is required, but $(php -r 'echo PHP_VERSION;') is installed. Skipping."; - exit 3 -fi diff --git a/projects/packages/compat/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/compat/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/compat/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/compat/composer.json b/projects/packages/compat/composer.json index b5d6ea8219eba..1c14d817ba3e2 100644 --- a/projects/packages/compat/composer.json +++ b/projects/packages/compat/composer.json @@ -3,7 +3,9 @@ "description": "Compatibility layer with previous versions of Jetpack", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "automattic/jetpack-changelogger": "@dev" }, diff --git a/projects/packages/composer-plugin/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/composer-plugin/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/composer-plugin/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/composer-plugin/composer.json b/projects/packages/composer-plugin/composer.json index 9d754297cf663..cef45d8c42421 100644 --- a/projects/packages/composer-plugin/composer.json +++ b/projects/packages/composer-plugin/composer.json @@ -10,6 +10,7 @@ "i18n" ], "require": { + "php": ">=7.0", "composer-plugin-api": "^2.1.0" }, "require-dev": { diff --git a/projects/packages/config/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/config/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/config/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/config/composer.json b/projects/packages/config/composer.json index 861ba754aead1..38ac35d75df5d 100644 --- a/projects/packages/config/composer.json +++ b/projects/packages/config/composer.json @@ -3,7 +3,9 @@ "description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "automattic/jetpack-changelogger": "@dev" }, diff --git a/projects/packages/connection/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/connection/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/connection/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/connection/composer.json b/projects/packages/connection/composer.json index ccf2fc4461e75..ece4ea5c27e3f 100644 --- a/projects/packages/connection/composer.json +++ b/projects/packages/connection/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-a8c-mc-stats": "@dev", "automattic/jetpack-admin-ui": "@dev", "automattic/jetpack-constants": "@dev", diff --git a/projects/packages/constants/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/constants/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/constants/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/constants/composer.json b/projects/packages/constants/composer.json index 1788cbc56ec40..7b0da4f984f59 100644 --- a/projects/packages/constants/composer.json +++ b/projects/packages/constants/composer.json @@ -3,7 +3,9 @@ "description": "A wrapper for defining constants in a more testable way.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0", diff --git a/projects/packages/device-detection/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/device-detection/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/device-detection/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/device-detection/composer.json b/projects/packages/device-detection/composer.json index f8e8e8ddbe895..d1ed2db42a4cd 100644 --- a/projects/packages/device-detection/composer.json +++ b/projects/packages/device-detection/composer.json @@ -3,7 +3,9 @@ "description": "A way to detect device types based on User-Agent header.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev" diff --git a/projects/packages/error/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/error/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/error/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/error/composer.json b/projects/packages/error/composer.json index a38e884211f75..352d21fcec52f 100644 --- a/projects/packages/error/composer.json +++ b/projects/packages/error/composer.json @@ -3,7 +3,9 @@ "description": "Jetpack Error - a wrapper around WP_Error.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev" diff --git a/projects/packages/forms/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/forms/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/forms/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/forms/composer.json b/projects/packages/forms/composer.json index b12fbc978701c..737073ea1065d 100644 --- a/projects/packages/forms/composer.json +++ b/projects/packages/forms/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-blocks": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", diff --git a/projects/packages/google-fonts-provider/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/google-fonts-provider/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/google-fonts-provider/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/google-fonts-provider/composer.json b/projects/packages/google-fonts-provider/composer.json index 877c2fd4a2e13..27278199aa74d 100644 --- a/projects/packages/google-fonts-provider/composer.json +++ b/projects/packages/google-fonts-provider/composer.json @@ -3,7 +3,9 @@ "description": "WordPress Webfonts provider for Google Fonts", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/heartbeat/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/heartbeat/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/heartbeat/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/heartbeat/composer.json b/projects/packages/heartbeat/composer.json index b9381e7565b16..f7c0defec1ff7 100644 --- a/projects/packages/heartbeat/composer.json +++ b/projects/packages/heartbeat/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/identity-crisis/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/identity-crisis/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/identity-crisis/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/identity-crisis/composer.json b/projects/packages/identity-crisis/composer.json index e535796fe7f44..378da0e487c56 100644 --- a/projects/packages/identity-crisis/composer.json +++ b/projects/packages/identity-crisis/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", "automattic/jetpack-status": "@dev", diff --git a/projects/packages/ignorefile/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/ignorefile/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/ignorefile/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/ignorefile/composer.json b/projects/packages/ignorefile/composer.json index f375bfc173e07..b34838c16d91f 100644 --- a/projects/packages/ignorefile/composer.json +++ b/projects/packages/ignorefile/composer.json @@ -3,7 +3,9 @@ "description": "Handle .gitignore style files.", "type": "library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "automattic/jetpack-changelogger": "@dev", "wikimedia/at-ease": "^1.2 || ^2.0", diff --git a/projects/packages/image-cdn/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/image-cdn/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/image-cdn/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/image-cdn/composer.json b/projects/packages/image-cdn/composer.json index bf2d25428dc79..1582c80c5673d 100644 --- a/projects/packages/image-cdn/composer.json +++ b/projects/packages/image-cdn/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-status": "@dev" }, diff --git a/projects/packages/import/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/import/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/import/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/import/composer.json b/projects/packages/import/composer.json index e8f442cbd62c9..2f444d2c291b4 100644 --- a/projects/packages/import/composer.json +++ b/projects/packages/import/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/ip/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/ip/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/ip/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/ip/composer.json b/projects/packages/ip/composer.json index 993a7639807c6..2814752f1998f 100644 --- a/projects/packages/ip/composer.json +++ b/projects/packages/ip/composer.json @@ -3,7 +3,9 @@ "description": "Utilities for working with IP addresses.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0", diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/jetpack-mu-wpcom/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/jetpack-mu-wpcom/composer.json b/projects/packages/jetpack-mu-wpcom/composer.json index 597ea86a447c2..f776ba4abca93 100644 --- a/projects/packages/jetpack-mu-wpcom/composer.json +++ b/projects/packages/jetpack-mu-wpcom/composer.json @@ -3,7 +3,9 @@ "description": "Enhances your site with features powered by WordPress.com", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/jitm/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/jitm/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/jitm/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/jitm/composer.json b/projects/packages/jitm/composer.json index 4ba22919fc5aa..7f8e18298d500 100644 --- a/projects/packages/jitm/composer.json +++ b/projects/packages/jitm/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-a8c-mc-stats": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", diff --git a/projects/packages/lazy-images/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/lazy-images/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/lazy-images/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/lazy-images/composer.json b/projects/packages/lazy-images/composer.json index be15926a9699d..6076559f7ecb3 100644 --- a/projects/packages/lazy-images/composer.json +++ b/projects/packages/lazy-images/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-constants": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-status": "@dev" diff --git a/projects/packages/licensing/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/licensing/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/licensing/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/licensing/composer.json b/projects/packages/licensing/composer.json index 89d7b7836a896..b5d249eff90c3 100644 --- a/projects/packages/licensing/composer.json +++ b/projects/packages/licensing/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/logo/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/logo/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/logo/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/logo/composer.json b/projects/packages/logo/composer.json index adf5f4b8f50ec..2a44ccc939dfd 100644 --- a/projects/packages/logo/composer.json +++ b/projects/packages/logo/composer.json @@ -3,7 +3,9 @@ "description": "A logo for Jetpack", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev" diff --git a/projects/packages/my-jetpack/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/my-jetpack/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..a3a1ead60365b --- /dev/null +++ b/projects/packages/my-jetpack/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed +Comment: Declare PHP >=7.0 requirement in composer.json. #34126 already handled adding a changelog entry for this. + diff --git a/projects/packages/my-jetpack/composer.json b/projects/packages/my-jetpack/composer.json index e5fb629033045..df040b45e1cb0 100644 --- a/projects/packages/my-jetpack/composer.json +++ b/projects/packages/my-jetpack/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-admin-ui": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", diff --git a/projects/packages/options/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/options/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/options/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/options/composer.json b/projects/packages/options/composer.json index 7106ecb7cb338..1a80b24af539a 100644 --- a/projects/packages/options/composer.json +++ b/projects/packages/options/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/partner/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/partner/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/partner/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/partner/composer.json b/projects/packages/partner/composer.json index e9d2a9eae99f0..064d05e56528e 100644 --- a/projects/packages/partner/composer.json +++ b/projects/packages/partner/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-status": "@dev" }, diff --git a/projects/packages/password-checker/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/password-checker/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/password-checker/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/password-checker/composer.json b/projects/packages/password-checker/composer.json index 532ff3e57d99a..c269ef3ba6d0b 100644 --- a/projects/packages/password-checker/composer.json +++ b/projects/packages/password-checker/composer.json @@ -3,7 +3,9 @@ "description": "Password Checker.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "automattic/jetpack-changelogger": "@dev", "automattic/wordbless": "@dev", diff --git a/projects/packages/phpcs-filter/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/phpcs-filter/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/phpcs-filter/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/phpcs-filter/composer.json b/projects/packages/phpcs-filter/composer.json index 543bfe724fe9b..2729ccabff768 100644 --- a/projects/packages/phpcs-filter/composer.json +++ b/projects/packages/phpcs-filter/composer.json @@ -13,6 +13,7 @@ "testing" ], "require": { + "php": ">=7.0", "automattic/ignorefile": "@dev", "squizlabs/php_codesniffer": "^3.6.1" }, diff --git a/projects/packages/plans/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/plans/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/plans/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/plans/composer.json b/projects/packages/plans/composer.json index 8b79a5ea08cef..ea423cc3f899e 100644 --- a/projects/packages/plans/composer.json +++ b/projects/packages/plans/composer.json @@ -4,6 +4,7 @@ "type": "library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/plugin-deactivation/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/plugin-deactivation/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/plugin-deactivation/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/plugin-deactivation/composer.json b/projects/packages/plugin-deactivation/composer.json index 8d292ea3d1085..b681633ca75d2 100644 --- a/projects/packages/plugin-deactivation/composer.json +++ b/projects/packages/plugin-deactivation/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev" }, "require-dev": { diff --git a/projects/packages/plugins-installer/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/plugins-installer/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/plugins-installer/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/plugins-installer/composer.json b/projects/packages/plugins-installer/composer.json index a0a0ea91dcbed..32918cf4825ae 100644 --- a/projects/packages/plugins-installer/composer.json +++ b/projects/packages/plugins-installer/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-a8c-mc-stats": "@dev" }, "require-dev": { diff --git a/projects/packages/post-list/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/post-list/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/post-list/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/post-list/composer.json b/projects/packages/post-list/composer.json index 1d8562229643e..1b14f7203ce56 100644 --- a/projects/packages/post-list/composer.json +++ b/projects/packages/post-list/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev" }, "require-dev": { diff --git a/projects/packages/publicize/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/publicize/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/publicize/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/publicize/composer.json b/projects/packages/publicize/composer.json index 2409622a7696c..185c243735bd9 100644 --- a/projects/packages/publicize/composer.json +++ b/projects/packages/publicize/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-autoloader": "@dev", "automattic/jetpack-config": "@dev", diff --git a/projects/packages/redirect/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/redirect/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/redirect/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/redirect/composer.json b/projects/packages/redirect/composer.json index e080a325e0204..9e023778c9b96 100644 --- a/projects/packages/redirect/composer.json +++ b/projects/packages/redirect/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-status": "@dev" }, "require-dev": { diff --git a/projects/packages/roles/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/roles/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/roles/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/roles/composer.json b/projects/packages/roles/composer.json index 3d173972007e5..85bb2d5245ca1 100644 --- a/projects/packages/roles/composer.json +++ b/projects/packages/roles/composer.json @@ -3,7 +3,9 @@ "description": "Utilities, related with user roles and capabilities.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0", diff --git a/projects/packages/search/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/search/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/search/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/search/composer.json b/projects/packages/search/composer.json index c5c329625511c..77d34edb44422 100644 --- a/projects/packages/search/composer.json +++ b/projects/packages/search/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-constants": "@dev", diff --git a/projects/packages/stats-admin/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/stats-admin/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/stats-admin/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/stats-admin/composer.json b/projects/packages/stats-admin/composer.json index 205934f861b14..1becfdd7da65e 100644 --- a/projects/packages/stats-admin/composer.json +++ b/projects/packages/stats-admin/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", "automattic/jetpack-plans": "@dev", diff --git a/projects/packages/stats/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/stats/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/stats/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/stats/composer.json b/projects/packages/stats/composer.json index bcee459db4b4e..b55fd3634a3a6 100644 --- a/projects/packages/stats/composer.json +++ b/projects/packages/stats/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", diff --git a/projects/packages/status/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/status/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/status/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/status/composer.json b/projects/packages/status/composer.json index e6973388e41c8..c38e253977c52 100644 --- a/projects/packages/status/composer.json +++ b/projects/packages/status/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-constants": "@dev" }, "require-dev": { diff --git a/projects/packages/sync/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/sync/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/sync/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/sync/composer.json b/projects/packages/sync/composer.json index 15430ea043acd..b7cd550ed6981 100644 --- a/projects/packages/sync/composer.json +++ b/projects/packages/sync/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", "automattic/jetpack-identity-crisis": "@dev", diff --git a/projects/packages/tracking/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/tracking/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/tracking/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/tracking/composer.json b/projects/packages/tracking/composer.json index 0b9f21144555d..b40fc87e28390 100644 --- a/projects/packages/tracking/composer.json +++ b/projects/packages/tracking/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-assets": "@dev", "automattic/jetpack-status": "@dev", "automattic/jetpack-connection": "@dev" diff --git a/projects/packages/transport-helper/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/transport-helper/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/transport-helper/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/transport-helper/composer.json b/projects/packages/transport-helper/composer.json index 105787f1b6773..dfb7791ad5233 100644 --- a/projects/packages/transport-helper/composer.json +++ b/projects/packages/transport-helper/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev" }, "require-dev": { diff --git a/projects/packages/videopress/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/videopress/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/videopress/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/videopress/composer.json b/projects/packages/videopress/composer.json index 6116f607dd59c..d55f2896d551b 100644 --- a/projects/packages/videopress/composer.json +++ b/projects/packages/videopress/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-admin-ui": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-connection": "@dev", diff --git a/projects/packages/waf/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/waf/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/waf/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/waf/composer.json b/projects/packages/waf/composer.json index 72244f107f724..ed7d0dca6c90f 100644 --- a/projects/packages/waf/composer.json +++ b/projects/packages/waf/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-constants": "@dev", "automattic/jetpack-ip": "@dev", diff --git a/projects/packages/wordads/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/wordads/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/wordads/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/wordads/composer.json b/projects/packages/wordads/composer.json index d269574e1e8e3..0e28fcd28744c 100644 --- a/projects/packages/wordads/composer.json +++ b/projects/packages/wordads/composer.json @@ -4,6 +4,7 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { + "php": ">=7.0", "automattic/jetpack-connection": "@dev", "automattic/jetpack-assets": "@dev", "automattic/jetpack-constants": "@dev", diff --git a/projects/packages/wp-js-data-sync/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/wp-js-data-sync/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/wp-js-data-sync/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/wp-js-data-sync/composer.json b/projects/packages/wp-js-data-sync/composer.json index 158931dc7394a..c6feefbf3773b 100644 --- a/projects/packages/wp-js-data-sync/composer.json +++ b/projects/packages/wp-js-data-sync/composer.json @@ -3,7 +3,9 @@ "description": "A package to setup REST API and script localization to pass data to a JavaScript client.", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev", diff --git a/projects/packages/yoast-promo/changelog/add-declare-php-version-for-all-composer-packages b/projects/packages/yoast-promo/changelog/add-declare-php-version-for-all-composer-packages new file mode 100644 index 0000000000000..35af13ebfdfee --- /dev/null +++ b/projects/packages/yoast-promo/changelog/add-declare-php-version-for-all-composer-packages @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +The package now requires PHP >= 7.0. diff --git a/projects/packages/yoast-promo/composer.json b/projects/packages/yoast-promo/composer.json index c80821f875a9e..3b58554763603 100644 --- a/projects/packages/yoast-promo/composer.json +++ b/projects/packages/yoast-promo/composer.json @@ -3,7 +3,9 @@ "description": "Components used to promote Yoast as part of our collaboration", "type": "jetpack-library", "license": "GPL-2.0-or-later", - "require": {}, + "require": { + "php": ">=7.0" + }, "require-dev": { "yoast/phpunit-polyfills": "1.1.0", "automattic/jetpack-changelogger": "@dev" diff --git a/tools/cli/commands/generate.js b/tools/cli/commands/generate.js index 571a74a904fef..0d87bd163cf13 100644 --- a/tools/cli/commands/generate.js +++ b/tools/cli/commands/generate.js @@ -548,6 +548,8 @@ async function createComposerJson( composerJson, answers ) { switch ( answers.type ) { case 'package': + composerJson.require = composerJson.require || {}; + composerJson.require.php = '>=7.0'; composerJson.extra = composerJson.extra || {}; composerJson.extra[ 'branch-alias' ] = composerJson.extra[ 'branch-alias' ] || {}; composerJson.extra[ 'branch-alias' ][ 'dev-trunk' ] = '0.1.x-dev';