Skip to content

Commit df8c344

Browse files
committed
WIP | Drop support for PHP < 7.2
MAYBE remove the security workflow completely ?
1 parent f83544c commit df8c344

File tree

10 files changed

+19
-108
lines changed

10 files changed

+19
-108
lines changed

.github/workflows/integrationtest.yml

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ jobs:
2626
strategy:
2727
matrix:
2828
php:
29-
- '5.4'
30-
- '5.5'
31-
- '5.6'
32-
- '7.0'
33-
- '7.1'
3429
- '7.2'
3530
- '7.3'
3631
- '7.4'
@@ -43,67 +38,22 @@ jobs:
4338
- '8.6'
4439
composer:
4540
- 'v2'
41+
- '2.2'
4642
os:
4743
- 'ubuntu-latest'
4844
- 'windows-latest'
4945

5046
exclude:
51-
# Installing on Windows with PHP 5.4 runs into all sorts of problems (which are not ours).
52-
# Considering PHP 5.4 is ancient, I deem it acceptable to exclude the Windows PHP 5.4 builds.
53-
# @link https://github.com/PHPCSStandards/composer-installer/pull/213
54-
- php: '5.4'
55-
os: 'windows-latest'
56-
57-
include:
58-
# Composer 2.3 drops support for PHP < 7.2, so for PHP 5.4 to 7.1, `v2` will install
59-
# Composer 2.2, for PHP 7.2 and up, `v2` will install Composer >= 2.3.
60-
# These builds make sure the Composer 2.2 LTS version is 100% supported for PHP 7.2-8.3.
61-
# Note: Composer 2.2 is not compatible with PHP 8.4 and it is unlikely that it will be
62-
# made compatible with PHP 8.4.
63-
- php: '7.2'
64-
composer: '2.2'
65-
os: 'ubuntu-latest'
66-
- php: '7.3'
67-
composer: '2.2'
68-
os: 'ubuntu-latest'
69-
- php: '7.4'
70-
composer: '2.2'
71-
os: 'ubuntu-latest'
72-
- php: '8.0'
73-
composer: '2.2'
74-
os: 'ubuntu-latest'
75-
- php: '8.1'
76-
composer: '2.2'
77-
os: 'ubuntu-latest'
78-
- php: '8.2'
47+
# Composer 2.3 drops support for PHP < 7.2, so `v2` will install Composer >= 2.3.
48+
# The current matrix is set up to safeguard that the Composer 2.2 LTS version is 100% supported for PHP 7.2-8.3.
49+
# Note: Composer 2.2 is not compatible with PHP >= 8.4 and it is unlikely that it will be
50+
# made compatible with PHP >= 8.4, so we need to exclude those builds.
51+
- php: '8.4'
7952
composer: '2.2'
80-
os: 'ubuntu-latest'
81-
- php: '8.3'
53+
- php: '8.5'
8254
composer: '2.2'
83-
os: 'ubuntu-latest'
84-
85-
- php: '7.2'
86-
composer: '2.2'
87-
os: 'windows-latest'
88-
- php: '7.3'
89-
composer: '2.2'
90-
os: 'windows-latest'
91-
- php: '7.4'
92-
composer: '2.2'
93-
os: 'windows-latest'
94-
- php: '8.0'
95-
composer: '2.2'
96-
os: 'windows-latest'
97-
- php: '8.1'
98-
composer: '2.2'
99-
os: 'windows-latest'
100-
- php: '8.2'
101-
composer: '2.2'
102-
os: 'windows-latest'
103-
- php: '8.3'
104-
composer: '2.2'
105-
os: 'windows-latest'
10655

56+
include:
10757
# Also test against the dev version of Composer for early warning about upcoming changes.
10858
- php: 'latest'
10959
composer: 'snapshot'

.github/workflows/phplint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
strategy:
2424
matrix:
25-
php: ['5.4', '5.6', '7.2', 'latest', 'nightly']
25+
php: ['7.2', 'latest', 'nightly']
2626

2727
continue-on-error: ${{ matrix.php == 'nightly' }}
2828

.github/workflows/quicktest.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,14 @@ jobs:
2828
strategy:
2929
matrix:
3030
php:
31-
- '5.4'
3231
- '7.2'
3332
- 'latest'
3433
composer:
35-
# Note: for PHP 5.4 - 7.1, "v2" will install Composer 2.2.
36-
# For PHP 7.2+, it will install Composer "latest".
3734
- 'v2'
3835
os:
3936
- 'ubuntu-latest'
4037
- 'windows-latest'
4138

42-
# Installing on Windows with PHP 5.4 runs into all sorts of problems (which are not ours).
43-
# Exclude the Windows PHP 5.4 builds and replace them with PHP 5.5 for the same.
44-
# @link https://github.com/PHPCSStandards/composer-installer/issues/181
45-
# @link https://github.com/PHPCSStandards/composer-installer/pull/213
46-
exclude:
47-
- php: '5.4'
48-
os: 'windows-latest'
49-
include:
50-
- php: '5.5'
51-
os: 'windows-latest'
52-
5339
name: "Quick test"
5440

5541
steps:

.github/workflows/securitycheck.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
php: ['5.4']
26+
php: ['7.2', 'latest']
2727

2828
steps:
2929
- name: Checkout code
@@ -47,12 +47,5 @@ jobs:
4747
# Ignore development-only packages in security check
4848
composer-options: "--no-dev"
4949

50-
- name: Download security checker
51-
# yamllint disable-line rule:line-length
52-
run: wget -P . https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64
53-
54-
- name: Make security checker executable
55-
run: chmod +x ./local-php-security-checker_2.0.6_linux_amd64
56-
5750
- name: Check against insecure dependencies
58-
run: ./local-php-security-checker_2.0.6_linux_amd64 --path=vendor/composer/installed.json
51+
run: composer audit --abandoned=fail

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ That's it.
4646

4747
This plugin is compatible with:
4848

49-
- PHP **5.4+**, **7.x**, and **8.x** (Support for PHP v8 is available since [`v0.7.0`][v0.7])
49+
- PHP **7.2**, and **8.x** (Support for PHP v8 is available since [`v0.7.0`][v0.7], support for PHP < 7.2 was dropped in [`v1.2.0`][v1.2])
5050
- [Composer][composer] **2.2+** (Support for Composer v2 is available since [`v0.7.0`][v0.7]; support for Composer < 2.2 was dropped in [`v1.1.0`][v1.1])
5151
- [PHP_CodeSniffer][codesniffer] **3.x** and **4.x**(Support for PHP_CodeSniffer v4 is available since [`v0.7.0`][v0.7], support for PHP_CodeSniffer v2 was dropped in [`v1.2.0`][v1.2])
5252

@@ -162,8 +162,8 @@ Create a composer package of your coding standard by adding a `composer.json` fi
162162
"name" : "acme/phpcodesniffer-our-standards",
163163
"description" : "Package contains all coding standards of the Acme company",
164164
"require" : {
165-
"php" : ">=5.4.0",
166-
"squizlabs/php_codesniffer" : "^3.13"
165+
"php" : ">=7.2.0",
166+
"squizlabs/php_codesniffer" : "^4.0"
167167
},
168168
"type" : "phpcodesniffer-standard"
169169
}

phpcs.xml.dist

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@
1414
<exclude-pattern>*/vendor/*</exclude-pattern>
1515

1616
<rule ref="PHPCompatibility"/>
17-
<config name="testVersion" value="5.4-"/>
17+
<config name="testVersion" value="7.2-"/>
1818

19-
<rule ref="PSR12">
20-
<!-- Constant visibility can not be declared (yet) as the minimum supported PHP version is 5.4
21-
and constant visibility was only introduced in PHP 7.1. -->
22-
<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/>
23-
</rule>
19+
<rule ref="PSR12"/>
2420

2521
<rule ref="Generic.Formatting.MultipleStatementAlignment">
2622
<properties>

tests/PHPCSVersions.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -332,20 +332,6 @@ public static function getSupportedVersions()
332332
* Adjust the list of available versions based on the PHP version on which the tests are run.
333333
*/
334334
switch (\CLI_PHP_MINOR) {
335-
case '5.4':
336-
case '5.5':
337-
case '5.6':
338-
case '7.0':
339-
case '7.1':
340-
$versions = array_filter(
341-
self::$allPhpcsVersions,
342-
static function ($version) {
343-
// PHPCS 3.x is the last version still supporting PHP < 7.2.
344-
return version_compare($version, '3.99.99', '<=');
345-
}
346-
);
347-
break;
348-
349335
case '7.2':
350336
$versions = self::$allPhpcsVersions;
351337
break;

tests/fixtures/dummy-src/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type" : "phpcodesniffer-standard",
55
"license" : "MIT",
66
"require" : {
7-
"php" : ">=5.4",
7+
"php" : ">=7.2",
88
"squizlabs/php_codesniffer" : "*",
99
"dealerdirect/phpcodesniffer-composer-installer" : "*"
1010
},

tests/fixtures/dummy-subdir/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type" : "phpcodesniffer-standard",
55
"license" : "MIT",
66
"require" : {
7-
"php" : ">=5.4",
7+
"php" : ">=7.2",
88
"squizlabs/php_codesniffer" : "*"
99
}
1010
}

tests/fixtures/incorrect-type/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type" : "coding-standard",
55
"license" : "MIT",
66
"require" : {
7-
"php" : ">=5.4",
7+
"php" : ">=7.2",
88
"squizlabs/php_codesniffer" : "*",
99
"dealerdirect/phpcodesniffer-composer-installer" : "*"
1010
},

0 commit comments

Comments
 (0)