Skip to content

Commit c82d5d3

Browse files
committed
GH Actions: change the building of the (release) PHARs to PHP 8.0
The PHP native `php_strip_whitespace()` function used in the PHAR build script is PHP version sensitive. The function strips comments and whitespace out of the code, but in PHP 7.4, attributes are seen as comments due to the `#[]` syntax, which means that if the PHAR files were being generated on PHP 7.4, the PHP 8.1 #[ReturnTypeWillChange]` attributes as put in via PR 3400 would be stripped out. In other words: for the PHAR files to be cross-version compatible, they *MUST* be generated on PHP 8.0 or higher. This fixes this for the CI part of things. Ref: https://www.php.net/manual/en/function.php-strip-whitespace.php
1 parent ea5356c commit c82d5d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Upload the PHPCS phar
4242
uses: actions/upload-artifact@v2
43-
if: ${{ success() && matrix.php == '7.4' }}
43+
if: ${{ success() && matrix.php == '8.0' }}
4444
with:
4545
name: phpcs-phar
4646
path: ./phpcs.phar
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Upload the PHPCBF phar
5151
uses: actions/upload-artifact@v2
52-
if: ${{ success() && matrix.php == '7.4' }}
52+
if: ${{ success() && matrix.php == '8.0' }}
5353
with:
5454
name: phpcbf-phar
5555
path: ./phpcbf.phar

0 commit comments

Comments
 (0)