Skip to content

Commit f3a9eb9

Browse files
authored
Merge pull request clue#50 from clue-labs/php8.2
Test on PHP 8.2 and update test environment
2 parents 3cd5ac5 + e419408 commit f3a9eb9

File tree

5 files changed

+35
-19
lines changed

5 files changed

+35
-19
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.2
1415
- 8.1
1516
- 8.0
1617
- 7.4
@@ -23,7 +24,7 @@ jobs:
2324
- 5.4
2425
- 5.3
2526
steps:
26-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2728
- uses: shivammathur/setup-php@v2
2829
with:
2930
php-version: ${{ matrix.php }}
@@ -42,13 +43,16 @@ jobs:
4243
4344
PHPUnit-hhvm:
4445
name: PHPUnit (HHVM)
45-
runs-on: ubuntu-18.04
46+
runs-on: ubuntu-22.04
4647
continue-on-error: true
4748
steps:
48-
- uses: actions/checkout@v2
49-
- uses: azjezz/setup-hhvm@v1
49+
- uses: actions/checkout@v3
50+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
51+
- name: Run hhvm composer.phar install
52+
uses: docker://hhvm/hhvm:3.30-lts-latest
5053
with:
51-
version: lts-3.30
52-
- run: composer self-update --2.2 # downgrade Composer for HHVM
53-
- run: hhvm $(which composer) install
54-
- run: hhvm vendor/bin/phpunit
54+
args: hhvm composer.phar install
55+
- name: Run hhvm vendor/bin/phpunit
56+
uses: docker://hhvm/hhvm:3.30-lts-latest
57+
with:
58+
args: hhvm vendor/bin/phpunit

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "clue/stream-filter",
33
"description": "A simple and modern approach to stream filtering in PHP",
44
"keywords": ["stream", "callback", "filter", "php_user_filter", "stream_filter_append", "stream_filter_register", "bucket brigade"],
5-
"homepage": "https://github.com/clue/php-stream-filter",
5+
"homepage": "https://github.com/clue/stream-filter",
66
"license": "MIT",
77
"authors": [
88
{
@@ -14,13 +14,19 @@
1414
"php": ">=5.3"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
17+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
1818
},
1919
"autoload": {
20-
"psr-4": { "Clue\\StreamFilter\\": "src/" },
21-
"files": [ "src/functions_include.php" ]
20+
"psr-4": {
21+
"Clue\\StreamFilter\\": "src/"
22+
},
23+
"files": [
24+
"src/functions_include.php"
25+
]
2226
},
2327
"autoload-dev": {
24-
"psr-4": { "Clue\\Tests\\StreamFilter\\": "tests/" }
28+
"psr-4": {
29+
"Clue\\Tests\\StreamFilter\\": "tests/"
30+
}
2531
}
2632
}

phpunit.xml.dist

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -17,4 +17,7 @@
1717
<directory>./src/</directory>
1818
</include>
1919
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
</php>
2023
</phpunit>

phpunit.xml.legacy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"

src/functions_include.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3+
namespace Clue\StreamFilter;
4+
35
// @codeCoverageIgnoreStart
4-
if (!\function_exists('Clue\\StreamFilter\\append')) {
6+
if (!\function_exists(__NAMESPACE__ . '\\append')) {
57
require __DIR__ . '/functions.php';
68
}
9+
// @codeCoverageIgnoreEnd

0 commit comments

Comments
 (0)