Skip to content

Commit a8e2071

Browse files
authored
Merge pull request #148 from marc-mabe/php8
PHP-8 support
2 parents bd7e9f6 + aa30bcc commit a8e2071

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ matrix:
3636
env:
3737
- CODE_COVERAGE="0"
3838
- BENCHMARK="0"
39+
- IGNORE_PLATFORM_REQS="1"
3940
allow_failures:
4041
- php: nightly
4142

@@ -49,7 +50,11 @@ install:
4950
- if [ "${BENCHMARK}" == "0" ]; then
5051
composer remove --dev phpbench/phpbench --no-update;
5152
fi
52-
- composer install -n
53+
- if [ "${IGNORE_PLATFORM_REQS}" == "1" ]; then
54+
composer install -n --ignore-platform-reqs;
55+
else
56+
composer install -n;
57+
fi
5358

5459
script:
5560
- if [ "$CODE_COVERAGE" == "1" ]; then

bench/bootstrap.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@
66
. "Current ini setting: zend.assertions = {$zendassertions}]" . PHP_EOL;
77
exit(1);
88
}
9-
assert_options(ASSERT_ACTIVE, 0);
10-
assert_options(ASSERT_WARNING, 0);
11-
assert_options(ASSERT_BAIL, 0);
12-
assert_options(ASSERT_QUIET_EVAL, 0);
139

1410
require_once __DIR__ . '/../vendor/autoload.php';

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}],
1818
"license": "BSD-3-Clause",
1919
"require": {
20-
"php": ">=7.1",
20+
"php": "^7.1 | ^8.0",
2121
"ext-reflection": "*"
2222
},
2323
"require-dev": {

tests/bootstrap.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@
1111
exit(1);
1212
}
1313

14-
// activate assertions
15-
assert_options(ASSERT_ACTIVE, 1);
16-
assert_options(ASSERT_WARNING, 0);
17-
assert_options(ASSERT_BAIL, 0);
18-
assert_options(ASSERT_QUIET_EVAL, 0);
19-
if (!class_exists('AssertionError')) {
20-
// AssertionError has been added in PHP-7.0
21-
class AssertionError extends Exception {};
22-
}
23-
assert_options(ASSERT_CALLBACK, function($file, $line, $code) {
24-
throw new AssertionError("assert(): Assertion '{$code}' failed in {$file} on line {$line}");
25-
});
26-
2714
// installed itself
2815
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
2916
require_once __DIR__ . '/../vendor/autoload.php';

0 commit comments

Comments
 (0)