Skip to content

Commit 217dbd5

Browse files
committed
Tests update.
- Add testing for PHP8. - Add guard against testing outside of Composer.
1 parent 3ef2361 commit 217dbd5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
operating-system: [ubuntu-latest]
12-
php-versions: ['7.2', '7.3', '7.4']
12+
php-versions: ['7.2', '7.3', '7.4', '8.0']
1313
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
1414
steps:
1515
- name: Checkout

tests.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
// Prevent running tests outside of Composer (if the package is deployed
3+
// somewhere live with this file still intact, useful to prevent hammering and
4+
// cycles being needlessly wasted).
5+
if (!isset($_SERVER['COMPOSER_BINARY'])) {
6+
die;
7+
}
8+
29
// Suppress unexpected errors from output and exit early as a failure when encountered.
310
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
411
exit(1);

0 commit comments

Comments
 (0)