Skip to content

Commit d2b9b2f

Browse files
committed
Merge pull request #12 from Frederick888/php82 into master
* php82: Add PHP 8.2 to CI Fix __toString() implemented without string return type warning
2 parents d163d9d + 9e0e41f commit d2b9b2f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest]
25-
php-version: ["8.1", "8.0", "7.4", "7.3"]
25+
php-version: ["8.2", "8.1", "8.0", "7.4", "7.3"]
2626

2727
steps:
2828
- uses: actions/checkout@v3
2929

3030
- name: Cancel Previous Runs
31-
if: contains(matrix.os, 'ubuntu') && contains(matrix.php-version, '8.1')
31+
if: contains(matrix.os, 'ubuntu') && contains(matrix.php-version, '8.2')
3232
uses: styfle/[email protected]
3333
with:
3434
access_token: ${{ github.token }}

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ before_script:
2222
paths:
2323
- modules/bencode.so
2424

25+
php82:
26+
extends: .php
27+
image: php:8.2
28+
2529
php81:
2630
extends: .php
2731
image: php:8.1

src/bencode.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static zend_function_entry bdict_methods[] = {
294294
PHP_ME(bdict, search, arginfo_void, ZEND_ACC_PUBLIC)
295295
PHP_ME(bdict, to_array, arginfo_void, ZEND_ACC_PUBLIC)
296296
PHP_ME(bdict, to_meta_array, arginfo_void, ZEND_ACC_PUBLIC)
297-
PHP_ME(bdict, __toString, arginfo_void, ZEND_ACC_PUBLIC)
297+
PHP_ME(bdict, __toString, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_HAS_RETURN_TYPE)
298298
{NULL, NULL, NULL}
299299
/* clang-format on */
300300
};
@@ -519,7 +519,7 @@ static zend_function_entry blist_methods[] = {
519519
PHP_ME(blist, search, arginfo_void, ZEND_ACC_PUBLIC)
520520
PHP_ME(blist, to_array, arginfo_void, ZEND_ACC_PUBLIC)
521521
PHP_ME(blist, to_meta_array, arginfo_void, ZEND_ACC_PUBLIC)
522-
PHP_ME(blist, __toString, arginfo_void, ZEND_ACC_PUBLIC)
522+
PHP_ME(blist, __toString, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_HAS_RETURN_TYPE)
523523
{NULL, NULL, NULL}
524524
/* clang-format on */
525525
};
@@ -625,7 +625,7 @@ static zend_function_entry bstr_methods[] = {
625625
PHP_ME(bitem, save, arginfo_void, ZEND_ACC_PUBLIC)
626626
PHP_ME(bstr, to_array, arginfo_void, ZEND_ACC_PUBLIC)
627627
PHP_ME(bstr, to_meta_array, arginfo_void, ZEND_ACC_PUBLIC)
628-
PHP_ME(bstr, __toString, arginfo_void, ZEND_ACC_PUBLIC)
628+
PHP_ME(bstr, __toString, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_HAS_RETURN_TYPE)
629629
{NULL, NULL, NULL}
630630
/* clang-format on */
631631
};
@@ -727,7 +727,7 @@ static zend_function_entry bint_methods[] = {
727727
PHP_ME(bitem, save, arginfo_void, ZEND_ACC_PUBLIC)
728728
PHP_ME(bint, to_array, arginfo_void, ZEND_ACC_PUBLIC)
729729
PHP_ME(bint, to_meta_array, arginfo_void, ZEND_ACC_PUBLIC)
730-
PHP_ME(bint, __toString, arginfo_void, ZEND_ACC_PUBLIC)
730+
PHP_ME(bint, __toString, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_HAS_RETURN_TYPE)
731731
{NULL, NULL, NULL}
732732
/* clang-format on */
733733
};

0 commit comments

Comments
 (0)