Skip to content

Commit 6e64281

Browse files
committed
Add support for PHP 8.1 and PHP 8.2 and update test suite
1 parent 137cae7 commit 6e64281

File tree

6 files changed

+53
-23
lines changed

6 files changed

+53
-23
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ on:
66

77
jobs:
88
PHPUnit:
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-22.04
1010
strategy:
1111
matrix:
1212
php:
13+
- 8.2
14+
- 8.1
1315
- 8.0
1416
- 7.4
1517
- 7.3
@@ -21,11 +23,12 @@ jobs:
2123
- 5.4
2224
- 5.3
2325
steps:
24-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v3
2527
- name: Setup PHP
2628
uses: shivammathur/setup-php@v2
2729
with:
2830
php-version: ${{ matrix.php }}
31+
coverage: xdebug
2932
- run: composer install
3033
- run: vendor/bin/phpunit --coverage-text
3134
if: ${{ matrix.php >= 7.3 }}
@@ -34,11 +37,16 @@ jobs:
3437

3538
PHPUnit-hhvm:
3639
name: PHPUnit (HHVM)
37-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-22.04
41+
continue-on-error: true
3842
steps:
39-
- uses: actions/checkout@v2
40-
- uses: azjezz/setup-hhvm@v1
43+
- uses: actions/checkout@v3
44+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
45+
- name: Run hhvm composer.phar install
46+
uses: docker://hhvm/hhvm:3.30-lts-latest
4147
with:
42-
version: lts-3.30
43-
- run: hhvm $(which composer) install
44-
- run: hhvm vendor/bin/phpunit
48+
args: hhvm composer.phar install
49+
- name: Run hhvm vendor/bin/phpunit
50+
uses: docker://hhvm/hhvm:3.30-lts-latest
51+
with:
52+
args: hhvm vendor/bin/phpunit

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-zenity
22

3-
[![CI status](https://github.com/clue/reactphp-zenity/workflows/CI/badge.svg)](https://github.com/clue/reactphp-zenity/actions)
3+
[![CI status](https://github.com/clue/reactphp-zenity/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-zenity/actions)
44
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/zenity-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/zenity-react)
55

66
Zenity allows you to build graphical desktop (GUI) applications in PHP, built on top of [ReactPHP](https://reactphp.org/).
@@ -292,29 +292,29 @@ $builder->warning($text, $title = null);
292292

293293
## Install
294294

295-
The recommended way to install this library is [through Composer](https://getcomposer.org).
295+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
296296
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
297297

298298
This will install the latest supported version:
299299

300300
```bash
301-
$ composer require clue/zenity-react:^0.4.4
301+
composer require clue/zenity-react:^0.4.4
302302
```
303303

304304
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
305305

306306
This project aims to run on any platform and thus does not require any PHP
307307
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
308308
HHVM.
309-
It's *highly recommended to use PHP 7+* for this project.
309+
It's *highly recommended to use the latest supported PHP version* for this project.
310310

311311
Obviously, this library requires the Zenity binary itself.
312312
Zenity already ships with Ubuntu-based distributions and should not require any installation there.
313313
On Debian- and Ubuntu-based distributions you can make sure it's installed like this:
314314

315315
```bash
316316
# usually not required
317-
$ sudo apt-get install zenity
317+
sudo apt-get install zenity
318318
```
319319

320320
Otherwise you may have to install Zenity yourself (use your favorite search engine, download the appropriate realease tarball or compile from soure).
@@ -332,16 +332,16 @@ $launcher->setBin('/path/to/zenity');
332332
## Tests
333333

334334
To run the test suite, you first need to clone this repo and then install all
335-
dependencies [through Composer](https://getcomposer.org):
335+
dependencies [through Composer](https://getcomposer.org/):
336336

337337
```bash
338-
$ composer install
338+
composer install
339339
```
340340

341341
To run the test suite, go to the project root and run:
342342

343343
```bash
344-
$ php vendor/bin/phpunit
344+
php vendor/bin/phpunit
345345
```
346346

347347
## License

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
},
1919
"require-dev": {
2020
"clue/block-react": "^1.1",
21-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8"
21+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8"
2222
},
2323
"autoload": {
24-
"psr-4": { "Clue\\React\\Zenity\\": "src/" }
24+
"psr-4": {
25+
"Clue\\React\\Zenity\\": "src/"
26+
}
2527
},
2628
"autoload-dev": {
27-
"psr-4": { "Clue\\Tests\\React\\Zenity\\": "tests/" }
29+
"psr-4": {
30+
"Clue\\Tests\\React\\Zenity\\": "tests/"
31+
}
2832
}
2933
}

phpunit.xml.dist

Lines changed: 11 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
colors="true"
88
cacheResult="false">
@@ -16,4 +16,12 @@
1616
<directory>./src/</directory>
1717
</include>
1818
</coverage>
19+
<php>
20+
<ini name="error_reporting" value="-1" />
21+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
22+
<!-- <ini name="zend.assertions" value="1" /> -->
23+
<ini name="assert.active" value="1" />
24+
<ini name="assert.exception" value="1" />
25+
<ini name="assert.bail" value="0" />
26+
</php>
1927
</phpunit>

phpunit.xml.legacy

Lines changed: 9 additions & 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"
@@ -15,4 +15,12 @@
1515
<directory>./src/</directory>
1616
</whitelist>
1717
</filter>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21+
<!-- <ini name="zend.assertions" value="1" /> -->
22+
<ini name="assert.active" value="1" />
23+
<ini name="assert.exception" value="1" />
24+
<ini name="assert.bail" value="0" />
25+
</php>
1826
</phpunit>

tests/Zen/FunctionalBaseZenTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
class FunctionalBaseZenTest extends TestCase
1010
{
11+
private $loop;
12+
1113
/**
1214
* @before
1315
*/

0 commit comments

Comments
 (0)