Skip to content

Commit 6692a95

Browse files
chore!: require php 8.5 for coding standards
BREAKING CHANGE: The coding standards package now requires PHP 8.5 or newer.
1 parent 3863541 commit 6692a95

4 files changed

Lines changed: 7 additions & 26 deletions

File tree

.github/workflows/qa.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@ jobs:
1515
uses: sympress/workflows/.github/workflows/lint-workflows.yml@v1
1616

1717
qa:
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
php-version:
22-
- '8.4'
23-
- '8.5'
2418
uses: sympress/workflows/.github/workflows/sympress-qa.yml@v1
2519
with:
26-
php_version: ${{ matrix.php-version }}
20+
php_version: '8.5'
2721
secrets:
2822
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
],
2727
"require": {
28-
"php": ">=8.4 <9.0",
28+
"php": "^8.5",
2929
"automattic/vipwpcs": "^3.0",
3030
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
3131
"phpcompatibility/php-compatibility": "^9.3 || ^10.0@alpha",
@@ -81,14 +81,14 @@
8181
"Composer\\Config::disableProcessTimeout",
8282
"phpunit"
8383
],
84-
"tests:coverage": [
85-
"Composer\\Config::disableProcessTimeout",
86-
"phpunit --coverage-text --coverage-clover tmp/coverage.xml --coverage-html tmp/coverage"
87-
],
8884
"qa": [
8985
"@cs",
9086
"@static-analysis",
9187
"@tests"
88+
],
89+
"tests:coverage": [
90+
"Composer\\Config::disableProcessTimeout",
91+
"phpunit --coverage-text --coverage-clover tmp/coverage.xml --coverage-html tmp/coverage"
9292
]
9393
}
9494
}

docs/Compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SymPress Coding Standards separates the PHP version required to run the standard
44

55
## Runtime Requirement
66

7-
The package can be installed on PHP 8.4 or newer. Projects that use syntax introduced after the PHP version running PHP_CodeSniffer should run PHPCS on the same PHP minor version as the project target, because tokenization of newer language syntax depends on the executing PHP runtime.
7+
The package can be installed on PHP 8.5 or newer. Projects that use syntax introduced after the PHP version running PHP_CodeSniffer should run PHPCS on the same PHP minor version as the project target, because tokenization of newer language syntax depends on the executing PHP runtime.
88

99
## Enterprise Profiles
1010

tests/unit/Php85SyntaxTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public function callback(): Closure
5151
#[Test]
5252
public function php85PipeTokenIsClassifiedAsOperator(): void
5353
{
54-
$this->requiresPhp85Runtime();
55-
5654
$file = $this->factoryFile(self::CODE, '8.5');
5755
$tokens = $file->getTokens();
5856

@@ -66,8 +64,6 @@ public function php85PipeTokenIsClassifiedAsOperator(): void
6664
#[Test]
6765
public function sympressPureParsesPhp85SyntaxWithoutSyntaxErrors(): void
6866
{
69-
$this->requiresPhp85Runtime();
70-
7167
$tempDir = sys_get_temp_dir() . '/sympress-cs-php85-' . bin2hex(random_bytes(8));
7268
self::assertTrue(mkdir($tempDir));
7369

@@ -95,13 +91,4 @@ public function sympressPureParsesPhp85SyntaxWithoutSyntaxErrors(): void
9591
rmdir($tempDir);
9692
}
9793
}
98-
99-
private function requiresPhp85Runtime(): void
100-
{
101-
if (PHP_VERSION_ID >= 80500) {
102-
return;
103-
}
104-
105-
self::markTestSkipped('PHP 8.5 syntax tokenization requires a PHP 8.5 runtime.');
106-
}
10794
}

0 commit comments

Comments
 (0)