Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop compatibility with PHP 5.6, 7.0 and 7.1 #333

Merged
merged 5 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
# Lint against the highest/lowest supported versions of each PHP major.
# And also do a run against "nightly" (the current dev version of PHP).
php_version: ['5.6', '7.0', '7.4', '8.0', '8.1', '8.2']
php_version: ['7.2', '7.4', '8.0', '8.1', '8.2']

name: "Lint: PHP ${{ matrix.php_version }}"

Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
php_version: ['5.6', '7.0', '7.4', '8.0', '8.1', '8.2']
php_version: ['7.2', '7.4', '8.0', '8.1', '8.2']

name: "Unit Test: PHP ${{ matrix.php_version }}"

Expand All @@ -39,23 +39,21 @@ jobs:
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none

# The PHP platform requirement would prevent updating the test utilities to the appropriate versions.
# As long as the `composer update` is run selectively to only update the test utils, removing this is fine.
- name: "Composer: remove the PHP platform requirement"
run: composer config --unset platform.php

# Install dependencies and handle caching in one go.
# - Updates the test utilities to the most appropriate version for the PHP version on which the tests will be run.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies (PHP < 7.3)
if: ${{ matrix.php_version < '7.3' }}
uses: ramsey/composer-install@v2
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Install Composer dependencies (PHP 7.3+)
if: ${{ matrix.php_version >= '7.3' }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
# Force a `composer update` run.
dependency-versions: "highest"
# But make it selective.
composer-options: "yoast/wp-test-utils --with-dependencies --ignore-platform-req=php"
composer-options: "yoast/wp-test-utils --with-dependencies"
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.6",
"php": "^7.2.5 || ^8.0",
"composer/installers": "^1.12.0"
},
"require-dev": {
"yoast/yoastcs": "^2.3.0",
"yoast/yoastcs": "^2.3.1",
"yoast/wp-test-utils": "^1.1.1"
},
"autoload": {
Expand All @@ -63,7 +63,7 @@
},
"config": {
"platform": {
"php": "5.6.40"
"php": "7.2.5"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
Expand Down
Loading