Skip to content

Commit 266fd14

Browse files
authored
Merge pull request #150 from marc-mabe/8.1
PHP 8.1 Support
2 parents 590a5b0 + f1088a9 commit 266fd14

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

.github/workflows/test.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
CODE_COVERAGE: true
2323
RUN_PHPSTAN: false
2424
RUN_PSALM: false
25-
RUN_BENCHMARK: false
25+
RUN_BENCHMARK: true
2626
- PHP_VERSION: 7.3
2727
CODE_COVERAGE: true
2828
RUN_PHPSTAN: false
@@ -32,12 +32,17 @@ jobs:
3232
CODE_COVERAGE: true
3333
RUN_PHPSTAN: true
3434
RUN_PSALM: true
35-
RUN_BENCHMARK: true
35+
RUN_BENCHMARK: false
3636
- PHP_VERSION: 8.0
3737
CODE_COVERAGE: true
3838
RUN_PHPSTAN: true
3939
RUN_PSALM: true
40-
RUN_BENCHMARK: true
40+
RUN_BENCHMARK: false
41+
- PHP_VERSION: 8.1.0RC1
42+
CODE_COVERAGE: true
43+
RUN_PHPSTAN: true
44+
RUN_PSALM: true
45+
RUN_BENCHMARK: false
4146
COMPOSER_EXTRA_ARGS: --ignore-platform-reqs
4247

4348
steps:
@@ -98,7 +103,7 @@ jobs:
98103

99104
- name: Run benchmark
100105
if: ${{ matrix.RUN_BENCHMARK }}
101-
run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'zend.assertions=-1' ./vendor/bin/phpbench run --no-interaction --revs=1 --retry-threshold=100 --progress=travis
106+
run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'zend.assertions=-1' ./vendor/bin/phpbench run --no-interaction --revs=1 --retry-threshold=100 --progress=none
102107

103108
- name: Export Docker Image
104109
if: steps.cache-docker-image.outputs.cache-hit != 'true'

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"ext-reflection": "*"
2222
},
2323
"require-dev": {
24-
"phpbench/phpbench": "^0.16.10",
25-
"phpstan/phpstan": "^0.12.42",
24+
"phpbench/phpbench": "^0.16.10 || ^1.0.4",
25+
"phpstan/phpstan": "^0.12.96",
2626
"phpunit/phpunit": "^7.5.20 | ^8.5.8 | ^9.3.8",
2727
"vimeo/psalm": "^3.15.0"
2828
},

phpbench.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"bootstrap": "bench/bootstrap.php",
3-
"path": "bench/",
4-
"retry_threshold": 2,
5-
"php_disable_ini": true,
6-
"php_config": {
2+
"runner.bootstrap": "bench/bootstrap.php",
3+
"runner.path": "bench/",
4+
"runner.retry_threshold": 2,
5+
"runner.php_disable_ini": true,
6+
"runner.file_pattern": "*Bench.php",
7+
"runner.php_config": {
78
"zend_extension": ["opcache.so"],
89
"zend.assertions": -1,
910
"opcache.enable_cli": 1

src/EnumMap.php

+1
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ public function offsetExists($enumerator): bool
319319
* @throws InvalidArgumentException On an invalid given enumerator
320320
* @see get()
321321
*/
322+
#[\ReturnTypeWillChange]
322323
public function offsetGet($enumerator)
323324
{
324325
try {

0 commit comments

Comments
 (0)